Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (31 sloc) 1.169 kb
<?php
/**
* @package framework
* @subpackage tests
*/
class FulltextSearchableTest extends SapphireTest {
public function setUp() {
parent::setUp();
$this->orig['File_searchable'] = Object::has_extension('File', 'FulltextSearchable');
// TODO This shouldn't need all arguments included
File::remove_extension('FulltextSearchable(\'"Filename","Title","Content"\')');
}
public function tearDown() {
// TODO This shouldn't need all arguments included
if($this->orig['File_searchable']) {
File::add_extension('FulltextSearchable(\'"Filename","Title","Content"\')');
}
parent::tearDown();
}
public function testEnable() {
FulltextSearchable::enable();
$this->assertTrue(Object::has_extension('File', 'FulltextSearchable'));
}
public function testEnableWithCustomClasses() {
FulltextSearchable::enable(array('File'));
$this->assertTrue(Object::has_extension('File', 'FulltextSearchable'));
// TODO This shouldn't need all arguments included
Object::remove_extension('File', 'FulltextSearchable(\'"Filename","Title","Content"\')');
$this->assertFalse(Object::has_extension('File', 'FulltextSearchable'));
}
}
Jump to Line
Something went wrong with that request. Please try again.