mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
test: use Response:: enum for HTTP status code
This commit is contained in:
@@ -16,6 +16,7 @@ use App\Tests\State\WatchlistUpdateProcessorTest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use PHPUnit\Framework\Attributes\DependsExternal;
|
||||
use Symfony\Component\HttpClient\Exception\ServerException;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Uid\UuidV4;
|
||||
|
||||
class AbstractProviderTest extends ApiTestCase
|
||||
@@ -83,7 +84,7 @@ class AbstractProviderTest extends ApiTestCase
|
||||
'authData' => $authData,
|
||||
'provider' => $connectorProvider->value,
|
||||
]]);
|
||||
$this->assertResponseStatusCodeSame(201);
|
||||
$this->assertResponseStatusCodeSame(Response::HTTP_CREATED);
|
||||
|
||||
/** @var EntityManagerInterface $entityManager */
|
||||
$entityManager = self::getContainer()->get(EntityManagerInterface::class);
|
||||
@@ -112,7 +113,7 @@ class AbstractProviderTest extends ApiTestCase
|
||||
$message = new OrderDomain($watchlist->getToken(), $domain->getLdhName(), $domain->getUpdatedAt());
|
||||
$orderDomainHandler($message);
|
||||
|
||||
$this->assertResponseStatusCodeSame(200);
|
||||
$this->assertResponseStatusCodeSame(Response::HTTP_OK);
|
||||
} catch (ServerException $e) {
|
||||
$this->markTestSkipped('Provider '.$connectorProvider->value.' is not ready. Response HTTP '.$e->getResponse()->getStatusCode());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user