Skip to content

Instantly share code, notes, and snippets.

@yvan-sraka
Created October 21, 2016 10:00
Show Gist options
  • Save yvan-sraka/61dc473a5df7a546df9fae13bb15b49e to your computer and use it in GitHub Desktop.
Save yvan-sraka/61dc473a5df7a546df9fae13bb15b49e to your computer and use it in GitHub Desktop.
<?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', $crawler->filter('#container h1')->text());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment