mirror of
https://github.com/silverstripe/doc.silverstripe.org
synced 2024-09-16 22:46:23 +02:00
7ecbf49ac9
git-svn-id: http://svn.silverstripe.com/projects/ss2doc/branches/v2@117896 467b73ca-7a2a-4603-9d3b-597d59a354a9
17 lines
502 B
PHP
17 lines
502 B
PHP
<?php
|
|
class ContentControllerSearchExtensionTest extends SapphireTest {
|
|
|
|
function testCustomSearchFormClassesToTest() {
|
|
FulltextSearchable::enable('File');
|
|
|
|
$page = new Page();
|
|
$page->URLSegment = 'whatever';
|
|
$page->Content = 'oh really?';
|
|
$page->write();
|
|
$page->publish('Stage', 'Live');
|
|
$controller = new ContentController($page);
|
|
$form = $controller->SearchForm();
|
|
|
|
if (get_class($form) == 'SearchForm') $this->assertEquals(array('File'), $form->getClassesToSearch());
|
|
}
|
|
} |