You are here

protected function WebTestBase::tearDown in SimpleTest 8.3

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

1 call to WebTestBase::tearDown()
BrokenSetUpTest::tearDown in src/Tests/BrokenSetUpTest.php
Cleans up after testing.
1 method overrides WebTestBase::tearDown()
BrokenSetUpTest::tearDown in src/Tests/BrokenSetUpTest.php
Cleans up after testing.

File

src/WebTestBase.php, line 502

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 = [];

  // 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 = [];
  $this->cookies = [];
}