mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Skip tests if dependancies missing
This commit is contained in:
parent
38c88094b9
commit
ce03eba8b8
@ -24,6 +24,11 @@ class SearchVariantSiteTreeSubsitesPolyhomeTest extends SapphireTest {
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
// Check subsites installed
|
||||
if(!class_exists('Subsite') || !class_exists('SubsitePolyhome')) {
|
||||
return $this->markTestSkipped('The subsites polyhome module is not installed');
|
||||
}
|
||||
|
||||
if (self::$index === null) self::$index = singleton('SearchVariantSiteTreeSubsitesPolyhomeTest_Index');
|
||||
|
||||
if (self::$subsite_a === null) {
|
||||
|
@ -21,6 +21,11 @@ class SearchVariantVersionedTest extends SapphireTest {
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
// Check versioned available
|
||||
if(!class_exists('Versioned')) {
|
||||
return $this->markTestSkipped('The versioned decorator is not installed');
|
||||
}
|
||||
|
||||
if (self::$index === null) self::$index = singleton('SearchVariantVersionedTest_Index');
|
||||
|
||||
FullTextSearch::force_index_list(self::$index);
|
||||
|
Loading…
Reference in New Issue
Block a user