diff options
Diffstat (limited to 'pollutometer-php/tests/AppBundle/Controller')
-rw-r--r-- | pollutometer-php/tests/AppBundle/Controller/DefaultControllerTest.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pollutometer-php/tests/AppBundle/Controller/DefaultControllerTest.php b/pollutometer-php/tests/AppBundle/Controller/DefaultControllerTest.php new file mode 100644 index 0000000..594803c --- /dev/null +++ b/pollutometer-php/tests/AppBundle/Controller/DefaultControllerTest.php @@ -0,0 +1,18 @@ +<?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()); + } +} |