Permalink
Browse files

MINOR Removing SiteTree dependency from FulltextSearchableTest

  • Loading branch information...
1 parent 3f3f0f6 commit b78b1309c96f00e7bd25d9c4921acb89b6c922ab @chillu chillu committed Mar 23, 2011
Showing with 2 additions and 6 deletions.
  1. +2 −6 tests/search/FulltextSearchableTest.php
@@ -10,30 +10,26 @@ function setUp() {
parent::setUp();
$this->orig['File_searchable'] = Object::has_extension('File', 'FulltextSearchable');
- $this->orig['SiteTree_searchable'] = Object::has_extension('SiteTree', 'FulltextSearchable');
// TODO This shouldn't need all arguments included
Object::remove_extension('File', 'FulltextSearchable(\'Filename,Title,Content\')');
- Object::remove_extension('SiteTree', 'FulltextSearchable(\'Title,MenuTitle,Content,MetaTitle,MetaDescription,MetaKeywords\')');
}
function tearDown() {
// TODO This shouldn't need all arguments included
if($this->orig['File_searchable']) Object::add_extension('File', 'FulltextSearchable(\'Filename,Title,Content\')');
- if($this->orig['SiteTree_searchable']) Object::add_extension('SiteTree', 'FulltextSearchable(\'Title,MenuTitle,Content,MetaTitle,MetaDescription,MetaKeywords\')');
parent::tearDown();
}
function testEnable() {
FulltextSearchable::enable();
- $this->assertTrue(Object::has_extension('SiteTree', 'FulltextSearchable'));
$this->assertTrue(Object::has_extension('File', 'FulltextSearchable'));
}
function testEnableWithCustomClasses() {
- FulltextSearchable::enable(array('SiteTree'));
- $this->assertTrue(Object::has_extension('SiteTree', 'FulltextSearchable'));
+ 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\')');

0 comments on commit b78b130

Please sign in to comment.