@@ -8,23 +8,23 @@ |
||
| 8 | 8 | { |
| 9 | 9 | $this->logInWithPermission('ADMIN'); |
| 10 | 10 | // pages need published, fixtures are not |
| 11 | - foreach (Page::get() as $page) { |
|
| 12 | - $page->doPublish(); |
|
| 13 | - } |
|
| 14 | - $response = $this->get('/sitemap/'); |
|
| 11 | + foreach (Page::get() as $page) { |
|
| 12 | + $page->doPublish(); |
|
| 13 | + } |
|
| 14 | + $response = $this->get('/sitemap/'); |
|
| 15 | 15 | $this->assertEquals(200, $response->getStatusCode()); |
| 16 | 16 | $positions = array(); |
| 17 | 17 | $body = $response->getBody(); |
| 18 | 18 | |
| 19 | 19 | // assert is a sitemap |
| 20 | 20 | $count = substr_count($body, '<ul class="sitemap-list">'); |
| 21 | - $this->assertEquals(2, $count); |
|
| 21 | + $this->assertEquals(2, $count); |
|
| 22 | 22 | |
| 23 | - // assert root level pages |
|
| 23 | + // assert root level pages |
|
| 24 | 24 | for ($i=1; $i <= 4; $i++) { |
| 25 | - $row = '<li><a href="page-' . $i . '" title="Go to the Page ' . $i . ' page">Page ' . $i . '</a>'; |
|
| 26 | - $this->assertContains($row, $body); |
|
| 27 | - $positions["{$i}"] = strpos($body, $row); |
|
| 25 | + $row = '<li><a href="page-' . $i . '" title="Go to the Page ' . $i . ' page">Page ' . $i . '</a>'; |
|
| 26 | + $this->assertContains($row, $body); |
|
| 27 | + $positions["{$i}"] = strpos($body, $row); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | //assert order |
@@ -21,8 +21,8 @@ |
||
| 21 | 21 | $this->assertEquals(2, $count); |
| 22 | 22 | |
| 23 | 23 | // assert root level pages |
| 24 | - for ($i=1; $i <= 4; $i++) { |
|
| 25 | - $row = '<li><a href="page-' . $i . '" title="Go to the Page ' . $i . ' page">Page ' . $i . '</a>'; |
|
| 24 | + for ($i = 1; $i <= 4; $i++) { |
|
| 25 | + $row = '<li><a href="page-'.$i.'" title="Go to the Page '.$i.' page">Page '.$i.'</a>'; |
|
| 26 | 26 | $this->assertContains($row, $body); |
| 27 | 27 | $positions["{$i}"] = strpos($body, $row); |
| 28 | 28 | } |