for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tests\AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
$client = static::createClient();
$crawler = $client->request('GET', '/');
$this->assertEquals(200, $client->getResponse()->getStatusCode());
$this->assertContains('Welcome to Symfony.si', $crawler->filter('h1')->text());
}
public function testContact()
$crawler = $client->request('GET', '/contact');
$this->assertContains('Contact', $crawler->filter('h1')->text());
public function testCopyright()
$crawler = $client->request('GET', '/copyrights');
$this->assertContains('Copyrights', $crawler->filter('h1')->text());