You are here

protected function WebTestBase::tearDown in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/WebTestBase.php \Drupal\simpletest\WebTestBase::tearDown()

Cleans up after testing.

Deletes created files and temporary files directory, deletes the tables created by setUp(), and resets the database prefix.

Overrides TestBase::tearDown

2 calls to WebTestBase::tearDown()
BrokenSetUpTest::tearDown in core/modules/simpletest/src/Tests/BrokenSetUpTest.php
Cleans up after testing.
ShutdownFunctionsTest::tearDown in core/modules/system/src/Tests/System/ShutdownFunctionsTest.php
Cleans up after testing.
2 methods override WebTestBase::tearDown()
BrokenSetUpTest::tearDown in core/modules/simpletest/src/Tests/BrokenSetUpTest.php
Cleans up after testing.
ShutdownFunctionsTest::tearDown in core/modules/system/src/Tests/System/ShutdownFunctionsTest.php
Cleans up after testing.

File

core/modules/simpletest/src/WebTestBase.php, line 1230
Contains \Drupal\simpletest\WebTestBase.

Class

WebTestBase
Test case for typical Drupal tests.

Namespace

Drupal\simpletest

Code

protected function tearDown() {

  // Destroy the testing kernel.
  if (isset($this->kernel)) {
    $this->kernel
      ->shutdown();
  }
  parent::tearDown();

  // Ensure that the maximum meta refresh count is reset.
  $this->maximumMetaRefreshCount = NULL;

  // Ensure that internal logged in variable and cURL options are reset.
  $this->loggedInUser = FALSE;
  $this->additionalCurlOptions = array();

  // Close the CURL handler and reset the cookies array used for upgrade
  // testing so test classes containing multiple tests are not polluted.
  $this
    ->curlClose();
  $this->curlCookies = array();
  $this->cookies = array();
}