25 lines
552 B
PHP
25 lines
552 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Tests\Controller;
|
||
|
|
|
||
|
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||
|
|
|
||
|
|
class SearchControllerTest extends WebTestCase
|
||
|
|
{
|
||
|
|
public function testSearchPageReturnsSuccess(): void
|
||
|
|
{
|
||
|
|
$client = static::createClient();
|
||
|
|
$client->request('GET', '/search');
|
||
|
|
|
||
|
|
self::assertResponseIsSuccessful();
|
||
|
|
}
|
||
|
|
|
||
|
|
public function testSearchWithQueryParam(): void
|
||
|
|
{
|
||
|
|
$client = static::createClient();
|
||
|
|
$client->request('GET', '/search?q=cosplay');
|
||
|
|
|
||
|
|
self::assertResponseIsSuccessful();
|
||
|
|
}
|
||
|
|
}
|