silverstripe-docsviewer/tests/DocumentationParserTest.php
2010-08-01 04:46:26 +00:00

15 lines
545 B
PHP

<?php
/**
* @package sapphiredocs
*/
class DocumentationParserTest extends SapphireTest {
function testGetPagesFromFolder() {
$pages = DocumentationParser::get_pages_from_folder(BASE_PATH . '/sapphiredocs/tests/docs/en/');
$this->assertContains('index', $pages->column('Filename'), 'Index');
$this->assertContains('subfolder', $pages->column('Filename'), 'Foldername');
$this->assertContains('test', $pages->column('Filename'), 'Filename');
$this->assertNotContains('_images', $pages->column('Filename'), 'Ignored files');
}
}