| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function testDirectoryIndex() |
||
| 23 | { |
||
| 24 | $this->login($this->getUser(Users::COMMITTER)); |
||
| 25 | |||
| 26 | $crawler = $this->client->request('GET', '/browse/?action=list'); |
||
| 27 | $this->assertStatusCode(200, $this->client); |
||
| 28 | |||
| 29 | $panels = $crawler->filter('.panel'); |
||
| 30 | $this->assertCount(2, $panels); |
||
| 31 | |||
| 32 | $this->assertEquals('Directories', $panels->eq(0)->filter('.panel-title')->text()); |
||
| 33 | $this->assertCount(1, $panels->eq(0)->filter('.table tr')); |
||
| 34 | $this->assertEquals( |
||
| 35 | 'Examples', |
||
| 36 | $panels->eq(0)->filter('.table tr')->eq(0)->filter('td')->eq(1)->filter('a')->text() |
||
| 37 | ); |
||
| 38 | |||
| 39 | $this->assertEquals('Files', $panels->eq(1)->filter('.panel-title')->text()); |
||
| 40 | $this->assertCount(1, $panels->eq(1)->filter('.table tr')); |
||
| 41 | $this->assertEquals( |
||
| 42 | 'index.md', |
||
| 43 | trim($panels->eq(1)->filter('.table tr')->eq(0)->filter('td')->eq(1)->filter('a')->text()) |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |