| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function testIndex() |
||
| 11 | { |
||
| 12 | $client = static::createClient(); |
||
| 13 | |||
| 14 | // Check basics. |
||
| 15 | $crawler = $client->request('GET', '/'); |
||
| 16 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
||
| 17 | $this->assertContains('Welcome to XTools!', $crawler->filter('#content h2')->text()); |
||
| 18 | |||
| 19 | // Change language. |
||
| 20 | $crawler = $client->request('GET', '/?uselang=es'); |
||
| 21 | $this->assertContains( |
||
| 22 | 'Te damos la bienvenida a las herramientas de X!', |
||
| 23 | $crawler->filter('#content h2')->text() |
||
| 24 | ); |
||
| 25 | |||
| 26 | // Make sure all active tools are listed. |
||
| 27 | $this->assertCount(7, $crawler->filter('#tool-list li')); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |