mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
test: add some KernelTestCase
This commit is contained in:
24
tests/Entity/InstanceTest.php
Normal file
24
tests/Entity/InstanceTest.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tests\Entity;
|
||||
|
||||
use ApiPlatform\Symfony\Bundle\Test\ApiTestCase;
|
||||
use App\Entity\Instance;
|
||||
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
||||
use Zenstruck\Foundry\Test\Factories;
|
||||
|
||||
final class InstanceTest extends ApiTestCase
|
||||
{
|
||||
use Factories;
|
||||
|
||||
/**
|
||||
* @throws TransportExceptionInterface
|
||||
*/
|
||||
public function testInstance(): void
|
||||
{
|
||||
$client = InstanceTest::createClient();
|
||||
$client->request('GET', '/api/config');
|
||||
$this->assertResponseIsSuccessful();
|
||||
$this->assertMatchesResourceItemJsonSchema(Instance::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user