function DrupalUnitTestCase::tearDown
1 call to DrupalUnitTestCase::tearDown()
- TableSortTest::tearDown in modules/
simpletest/ tests/ tablesort.test
1 method overrides DrupalUnitTestCase::tearDown()
- TableSortTest::tearDown in modules/
simpletest/ tests/ tablesort.test
File
-
modules/
simpletest/ drupal_web_test_case.php, line 822
Class
- DrupalUnitTestCase
- Test case for Drupal unit tests.
Code
protected function tearDown() {
global $conf, $language;
// Get back to the original connection.
Database::removeConnection('default');
Database::renameConnection('simpletest_original_default', 'default');
$conf['file_public_path'] = $this->originalFileDirectory;
// Restore modules if necessary.
if (isset($this->originalModuleList)) {
module_list(TRUE, FALSE, FALSE, $this->originalModuleList);
}
// Reset language.
$language = $this->originalLanguage;
if ($this->originalLanguageDefault) {
$GLOBALS['conf']['language_default'] = $this->originalLanguageDefault;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.