mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 17:55:42 +00:00
27 lines
810 B
PHP
27 lines
810 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Tests\Controller;
|
||
|
|
|
||
|
|
use App\Entity\Domain;
|
||
|
|
use App\Factory\UserFactory;
|
||
|
|
use App\Tests\AbstractTest;
|
||
|
|
use App\Tests\Service\RDAPServiceTest;
|
||
|
|
use PHPUnit\Framework\Attributes\DependsExternal;
|
||
|
|
use Zenstruck\Foundry\Test\Factories;
|
||
|
|
|
||
|
|
final class DomainRefreshControllerTest extends AbstractTest
|
||
|
|
{
|
||
|
|
use Factories;
|
||
|
|
|
||
|
|
#[DependsExternal(RDAPServiceTest::class, 'testUpdateRdapServers')]
|
||
|
|
public function testRegisterDomain(): void
|
||
|
|
{
|
||
|
|
$testUser = UserFactory::createOne();
|
||
|
|
$client = DomainRefreshControllerTest::createClientWithCredentials(DomainRefreshControllerTest::getToken($testUser));
|
||
|
|
$client->request('GET', '/api/domains/example.com');
|
||
|
|
|
||
|
|
$this->assertResponseIsSuccessful();
|
||
|
|
$this->assertMatchesResourceItemJsonSchema(Domain::class);
|
||
|
|
}
|
||
|
|
}
|