test: add some KernelTestCase

This commit is contained in:
Maël Gangloff
2025-10-14 00:09:01 +02:00
parent 398ca8df2f
commit 6154759507
15 changed files with 884 additions and 3 deletions

View 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);
}
}