mirror of
https://github.com/silverstripe/doc.silverstripe.org
synced 2024-10-22 17:05:50 +02:00
ec0e4a4b96
git-svn-id: http://svn.silverstripe.com/projects/ss2doc/branches/v2@116279 467b73ca-7a2a-4603-9d3b-597d59a354a9
30 lines
762 B
PHP
30 lines
762 B
PHP
<?php
|
|
|
|
/**
|
|
* @package sapphiredocs
|
|
* @subpackage tests
|
|
*/
|
|
|
|
class DocumentationSearchTest extends SapphireTest {
|
|
|
|
function setUp() {
|
|
parent::setUp();
|
|
|
|
if(!DocumentationSearch::enabled()) return;
|
|
|
|
DocumentationService::set_automatic_registration(false);
|
|
DocumentationService::register('docs-search', BASE_PATH . '/sapphiredocs/tests/docs-search/');
|
|
}
|
|
|
|
function testGetAllPages() {
|
|
|
|
if(!DocumentationSearch::enabled()) return;
|
|
|
|
DocumentationService::set_automatic_registration(false);
|
|
DocumentationService::register('docs-search', BASE_PATH . '/sapphiredocs/tests/docs-search/');
|
|
|
|
$search = DocumentationSearch::get_all_documentation_pages();
|
|
|
|
$this->assertEquals(7, $search->Count(), '5 pages. 5 pages in entire folder');
|
|
}
|
|
} |