MINOR Adding SiteConfig as Translatable dependency in SiteTreeTest and TranslatableTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98228 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-02-04 19:21:48 +00:00 committed by Sam Minnee
parent e26333e3c9
commit f31ec616a7
2 changed files with 8 additions and 2 deletions

View File

@ -23,8 +23,10 @@ class SiteTreeTest extends SapphireTest {
Translatable::set_default_locale("en_US");
// refresh the decorated statics - different fields in $db with Translatable enabled
if(self::$origTranslatableSettings['has_extension'])
if(self::$origTranslatableSettings['has_extension']) {
Object::remove_extension('SiteTree', 'Translatable');
Object::remove_extension('SiteConfig', 'Translatable');
}
// recreate database with new settings
$dbname = self::create_temp_db();
@ -34,8 +36,11 @@ class SiteTreeTest extends SapphireTest {
}
static function tear_down_once() {
if(self::$origTranslatableSettings['has_extension'])
if(self::$origTranslatableSettings['has_extension']) {
Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('SiteConfig', 'Translatable');
}
Translatable::set_default_locale(self::$origTranslatableSettings['default_locale']);
Translatable::set_current_locale(self::$origTranslatableSettings['default_locale']);

View File

@ -16,6 +16,7 @@ class TranslatableTest extends FunctionalTest {
protected $requiredExtensions = array(
'SiteTree' => array('Translatable'),
'SiteConfig' => array('Translatable'),
'TranslatableTest_DataObject' => array('Translatable'),
);