From 5ad33a014aa2609fca466020e6c406607616e9a1 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 21 Oct 2009 22:08:35 +0000 Subject: [PATCH] BUGFIX Reset $_SINGLETONS cache in SiteTreeTest::tear_down() to avoid stale Translatable information. This broke SiteTreePermissionTest and SiteTreeTest when running in parallel with Translatable enabled. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89881 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- tests/SiteTreeTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/SiteTreeTest.php b/tests/SiteTreeTest.php index ba061281a..dfd937616 100755 --- a/tests/SiteTreeTest.php +++ b/tests/SiteTreeTest.php @@ -44,6 +44,10 @@ class SiteTreeTest extends SapphireTest { Translatable::set_default_locale(self::$origTranslatableSettings['default_locale']); Translatable::set_current_locale(self::$origTranslatableSettings['default_locale']); + // clear singletons, they're caching old extension info which is used in DatabaseAdmin->doBuild() + global $_SINGLETONS; + $_SINGLETONS = array(); + self::kill_temp_db(); self::create_temp_db();