mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-09-06 09:41:12 +02:00
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());
|
||
|
}
|
||
|
}
|