コード例 #1
0
 function testGetEntities()
 {
     $v = new DocumentationViewer();
     $response = $v->handleRequest(new SS_HTTPRequest('GET', 'DocumentationViewerTests/en/2.4'));
     $pages = $v->getEntities();
     $this->assertEquals(3, $pages->Count(), 'Registered 3 entities');
     // check to see the links don't have version or pages in them
     foreach ($pages as $page) {
         $expected = Controller::join_links('docs', $page->Title, 'en');
         $this->assertStringEndsWith($expected, $page->Link);
     }
 }