feat: Ajoute HomeController et son test
This commit is contained in:
23
tests/Controller/HomeControllerTest.php
Normal file
23
tests/Controller/HomeControllerTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class HomeControllerTest extends WebTestCase
|
||||
{
|
||||
public function testIndex(): void
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
// Request a specific page
|
||||
$crawler = $client->request('GET', '/');
|
||||
|
||||
// Validate a successful response and some content
|
||||
$this->assertResponseIsSuccessful();
|
||||
$this->assertResponseHeaderSame('Content-Type', 'application/json');
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user