You are here

protected function KernelTestBase::tearDown in Zircon Profile 8

Same name in this branch
  1. 8 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::tearDown()
  2. 8 core/modules/simpletest/src/KernelTestBase.php \Drupal\simpletest\KernelTestBase::tearDown()
Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/KernelTestBase.php \Drupal\simpletest\KernelTestBase::tearDown()

Performs cleanup tasks after each individual test method has been run.

Overrides TestBase::tearDown

4 calls to KernelTestBase::tearDown()
GenericCacheBackendUnitTestBase::tearDown in core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
Performs cleanup tasks after each individual test method has been run.
MigrateTestBase::tearDown in core/modules/migrate/src/Tests/MigrateTestBase.php
Performs cleanup tasks after each individual test method has been run.
PathUnitTestBase::tearDown in core/modules/system/src/Tests/Path/PathUnitTestBase.php
Performs cleanup tasks after each individual test method has been run.
RouteProviderTest::tearDown in core/modules/system/src/Tests/Routing/RouteProviderTest.php
Performs cleanup tasks after each individual test method has been run.
4 methods override KernelTestBase::tearDown()
GenericCacheBackendUnitTestBase::tearDown in core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
Performs cleanup tasks after each individual test method has been run.
MigrateTestBase::tearDown in core/modules/migrate/src/Tests/MigrateTestBase.php
Performs cleanup tasks after each individual test method has been run.
PathUnitTestBase::tearDown in core/modules/system/src/Tests/Path/PathUnitTestBase.php
Performs cleanup tasks after each individual test method has been run.
RouteProviderTest::tearDown in core/modules/system/src/Tests/Routing/RouteProviderTest.php
Performs cleanup tasks after each individual test method has been run.

File

core/modules/simpletest/src/KernelTestBase.php, line 279
Contains \Drupal\simpletest\KernelTestBase.

Class

KernelTestBase
Base class for integration tests.

Namespace

Drupal\simpletest

Code

protected function tearDown() {
  if ($this->kernel instanceof DrupalKernel) {
    $this->kernel
      ->shutdown();
  }

  // Before tearing down the test environment, ensure that no stream wrapper
  // of this test leaks into the parent environment. Unlike all other global
  // state variables in Drupal, stream wrappers are a global state construct
  // of PHP core, which has to be maintained manually.
  // @todo Move StreamWrapper management into DrupalKernel.
  // @see https://www.drupal.org/node/2028109
  foreach ($this->streamWrappers as $scheme => $type) {
    $this
      ->unregisterStreamWrapper($scheme, $type);
  }
  parent::tearDown();
}