Permalink
Browse files

MINOR Adding SiteConfig as Translatable dependency in SiteTreeTest an…

…d TranslatableTest (from r98228)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102634 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent d7f2925 commit b73d75f90770b754dde069996c13881edca3cbf4 @chillu chillu committed Apr 13, 2010
Showing with 8 additions and 2 deletions.
  1. +7 −2 tests/SiteTreeTest.php
  2. +1 −0 tests/model/TranslatableTest.php
@@ -23,8 +23,10 @@ static function set_up_once() {
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 @@ static function set_up_once() {
}
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']);
@@ -16,6 +16,7 @@ class TranslatableTest extends FunctionalTest {
protected $requiredExtensions = array(
'SiteTree' => array('Translatable'),
+ 'SiteConfig' => array('Translatable'),
'TranslatableTest_DataObject' => array('Translatable'),
);

0 comments on commit b73d75f

Please sign in to comment.