Loading modules/simpletest/drupal_web_test_case.php +28 −2 Original line number Diff line number Diff line Loading @@ -75,6 +75,21 @@ abstract class DrupalTestCase { */ protected $originalLanguageDefault; /** * The original theme. */ protected $originalTheme; /** * The original theme key. */ protected $originalThemeKey; /** * The original theme path. */ protected $originalThemePath; /** * Current results of this test case. * Loading Loading @@ -1451,7 +1466,7 @@ protected function changeDatabasePrefix() { * @see DrupalWebTestCase::tearDown() */ protected function prepareEnvironment() { global $user, $language, $language_url, $conf; global $user, $language, $language_url, $conf, $theme, $theme_key, $theme_path; // Store necessary current values before switching to prefixed database. $this->originalLanguage = $language; Loading @@ -1468,6 +1483,12 @@ protected function prepareEnvironment() { // The following array/object conversion is copied from language_default(). $language_url = $language = (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => ''); // Reset the theme globals. $this->originalTheme = $theme; $this->originalThemeKey = $theme_key; $this->originalThemePath = $theme_path; $theme = $theme_key = $theme_path = NULL; // Save and clean the shutdown callbacks array because it is static cached // and will be changed by the test run. Otherwise it will contain callbacks // from both environments and the testing environment will try to call the Loading Loading @@ -1919,7 +1940,7 @@ protected function refreshVariables() { * and reset the database prefix. */ protected function tearDown() { global $user, $language, $language_url; global $user, $language, $language_url, $theme, $theme_key, $theme_path; // In case a fatal error occurred that was not in the test process read the // log to pick up any fatal errors. Loading Loading @@ -1992,6 +2013,11 @@ protected function tearDown() { $GLOBALS['conf']['language_default'] = $this->originalLanguageDefault; } // Reset theme. $theme = $this->originalTheme; $theme_key = $this->originalThemeKey; $theme_path = $this->originalThemePath; // Close the CURL handler and reset the cookies array so test classes // containing multiple tests are not polluted. $this->curlClose(); Loading Loading
modules/simpletest/drupal_web_test_case.php +28 −2 Original line number Diff line number Diff line Loading @@ -75,6 +75,21 @@ abstract class DrupalTestCase { */ protected $originalLanguageDefault; /** * The original theme. */ protected $originalTheme; /** * The original theme key. */ protected $originalThemeKey; /** * The original theme path. */ protected $originalThemePath; /** * Current results of this test case. * Loading Loading @@ -1451,7 +1466,7 @@ protected function changeDatabasePrefix() { * @see DrupalWebTestCase::tearDown() */ protected function prepareEnvironment() { global $user, $language, $language_url, $conf; global $user, $language, $language_url, $conf, $theme, $theme_key, $theme_path; // Store necessary current values before switching to prefixed database. $this->originalLanguage = $language; Loading @@ -1468,6 +1483,12 @@ protected function prepareEnvironment() { // The following array/object conversion is copied from language_default(). $language_url = $language = (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => ''); // Reset the theme globals. $this->originalTheme = $theme; $this->originalThemeKey = $theme_key; $this->originalThemePath = $theme_path; $theme = $theme_key = $theme_path = NULL; // Save and clean the shutdown callbacks array because it is static cached // and will be changed by the test run. Otherwise it will contain callbacks // from both environments and the testing environment will try to call the Loading Loading @@ -1919,7 +1940,7 @@ protected function refreshVariables() { * and reset the database prefix. */ protected function tearDown() { global $user, $language, $language_url; global $user, $language, $language_url, $theme, $theme_key, $theme_path; // In case a fatal error occurred that was not in the test process read the // log to pick up any fatal errors. Loading Loading @@ -1992,6 +2013,11 @@ protected function tearDown() { $GLOBALS['conf']['language_default'] = $this->originalLanguageDefault; } // Reset theme. $theme = $this->originalTheme; $theme_key = $this->originalThemeKey; $theme_path = $this->originalThemePath; // Close the CURL handler and reset the cookies array so test classes // containing multiple tests are not polluted. $this->curlClose(); Loading