You are here

function DrupalUnitTestCase::tearDown in SimpleTest 7

Same name and namespace in other branches
  1. 6.2 drupal_web_test_case.php \DrupalUnitTestCase::tearDown()
  2. 7.2 drupal_web_test_case.php \DrupalUnitTestCase::tearDown()

File

./drupal_web_test_case.php, line 555

Class

DrupalUnitTestCase
Test case for Drupal unit tests.

Code

function tearDown() {
  global $db_prefix, $conf;
  if (preg_match('/simpletest\\d+/', $db_prefix)) {
    $conf['file_public_path'] = $this->originalFileDirectory;

    // Return the database prefix to the original.
    $db_prefix = $this->originalPrefix;

    // Restore modules if necessary.
    if (isset($this->originalModuleList)) {
      module_list(TRUE, FALSE, FALSE, $this->originalModuleList);
    }
  }
}