mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
Fix: failing unit test (DocumentationViewerTest)
In testGetModulePagesShort() and testGetEntityPages() the pages in the array are (getEntityPages() doesn't include index nor _images): 0 -> Sort 1 -> Submenu 2 -> Test
This commit is contained in:
parent
9f1f70a065
commit
aacc16c979
@ -110,7 +110,7 @@ class DocumentationViewerTest extends FunctionalTest {
|
|||||||
|
|
||||||
$arr = $pages->toArray();
|
$arr = $pages->toArray();
|
||||||
|
|
||||||
$page = $arr[2];
|
$page = $arr[1];
|
||||||
|
|
||||||
$this->assertEquals('Subfolder', $page->Title);
|
$this->assertEquals('Subfolder', $page->Title);
|
||||||
}
|
}
|
||||||
@ -139,10 +139,10 @@ class DocumentationViewerTest extends FunctionalTest {
|
|||||||
|
|
||||||
// Children
|
// Children
|
||||||
$pagesArr = $pages->toArray();
|
$pagesArr = $pages->toArray();
|
||||||
$child1 = $pagesArr[1];
|
$child1 = $pagesArr[2];
|
||||||
|
|
||||||
$this->assertFalse($child1->Children);
|
$this->assertFalse($child1->Children);
|
||||||
$child2 = $pagesArr[2];
|
$child2 = $pagesArr[1];
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array('subfolder/subpage.md', 'subfolder/subsubfolder/'),
|
array('subfolder/subpage.md', 'subfolder/subsubfolder/'),
|
||||||
|
Loading…
Reference in New Issue
Block a user