2011-03-22 10:00:53 +01:00
|
|
|
<?php
|
|
|
|
class ContentControllerSearchExtensionTest extends SapphireTest {
|
|
|
|
|
2012-09-19 12:07:46 +02:00
|
|
|
public function testCustomSearchFormClassesToTest() {
|
2011-03-22 10:00:53 +01:00
|
|
|
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());
|
|
|
|
}
|
2012-04-12 09:23:20 +02:00
|
|
|
}
|