function 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

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

File

core/modules/simpletest/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 = [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.