function KernelTestBase::tearDown
Same name in this branch
- 8.9.x core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::tearDown()
Same name in other branches
- 9 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::tearDown()
- 10 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::tearDown()
- 11.x core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::tearDown()
Overrides TestBase::tearDown
1 call 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.
1 method overrides KernelTestBase::tearDown()
- GenericCacheBackendUnitTestBase::tearDown in core/
modules/ system/ src/ Tests/ Cache/ GenericCacheBackendUnitTestBase.php - Performs cleanup tasks after each individual test method has been run.
File
-
core/
modules/ simpletest/ src/ KernelTestBase.php, line 316
Class
- KernelTestBase
- Base class for functional integration tests.
Namespace
Drupal\simpletestCode
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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.