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:
@@ -9,6 +9,7 @@ use App\Factory\UserFactory;
|
||||
use App\Tests\AuthenticatedUserTrait;
|
||||
use App\Tests\Service\RDAPServiceTest;
|
||||
use PHPUnit\Framework\Attributes\DependsExternal;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Zenstruck\Foundry\Test\Factories;
|
||||
|
||||
final class WatchlistUpdateProcessorTest extends ApiTestCase
|
||||
@@ -21,7 +22,7 @@ final class WatchlistUpdateProcessorTest extends ApiTestCase
|
||||
{
|
||||
self::createUserAndWatchlist();
|
||||
$this->assertResponseIsSuccessful();
|
||||
$this->assertResponseStatusCodeSame(201);
|
||||
$this->assertResponseStatusCodeSame(Response::HTTP_CREATED);
|
||||
$this->assertMatchesResourceItemJsonSchema(Watchlist::class);
|
||||
}
|
||||
|
||||
@@ -31,7 +32,7 @@ final class WatchlistUpdateProcessorTest extends ApiTestCase
|
||||
$client = self::createClientWithCredentials(self::getToken(UserFactory::createOne()));
|
||||
self::createUserAndWatchlist($client);
|
||||
self::createUserAndWatchlist($client);
|
||||
$this->assertResponseStatusCodeSame(403);
|
||||
$this->assertResponseStatusCodeSame(Response::HTTP_FORBIDDEN);
|
||||
}
|
||||
|
||||
#[DependsExternal(RDAPServiceTest::class, 'testUpdateRdapServers')]
|
||||
|
||||
Reference in New Issue
Block a user