mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
18 lines
510 B
PHP
18 lines
510 B
PHP
<?php
|
|
class ContentControllerSearchExtensionTest extends SapphireTest {
|
|
|
|
public 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());
|
|
}
|
|
}
|