You are here

protected function DrupalRemoteTestCase::tearDown in SimpleTest 7.2

Perform and revert actions, then tear down based on what setUp() did.

Overrides DrupalWebTestCase::tearDown

1 call to DrupalRemoteTestCase::tearDown()
DrupalRemoteTestCase::setUrl in ./drupal_web_test_case.php
Set the remote URL base.

File

./drupal_web_test_case.php, line 3616
Provides DrupalTestCase, DrupalUnitTestCase, and DrupalWebTestCase classes.

Class

DrupalRemoteTestCase
Base class used for writing atomic remote tests.

Code

protected function tearDown() {

  // Perform all actions as part of the test and revert them.
  $this
    ->performActions();
  $this
    ->revertActions();

  // Revert all URL variables to their original values.
  foreach (self::$URL_VARIABLES as $variable) {
    $GLOBALS[$variable] = $this->originalUrls[$variable];
  }

  // BEGIN: Excerpt from DrupalUnitTestCase.
  global $conf;

  // 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);
  //     }
  //     // END: Excerpt from DrupalUnitTestCase.
}