for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
/**
* @group controller
*/
class LuckyControllerTest extends WebTestCase
{
* Test the /lucky/number route.
public function testLuckyNumber(): void
$client = static::createClient();
$client->request('GET', '/lucky/number');
$this->assertResponseIsSuccessful();
$this->assertSelectorTextContains('body', 'Lucky number:');
}
* Test the /lucky/hello route.
public function testLuckyHello(): void
$client->request('GET', '/lucky/hello');
$this->assertSelectorTextContains('body', 'Hello to you!');