protected function FixtureBase::tearDown in Lightning Core 8.5
Same name and namespace in other branches
- 8.3 tests/src/FixtureBase.php \Drupal\Tests\lightning_core\FixtureBase::tearDown()
- 8.4 tests/src/FixtureBase.php \Drupal\Tests\lightning_core\FixtureBase::tearDown()
Tears down the fixture.
1 call to FixtureBase::tearDown()
- FixtureContext::tearDown in tests/
src/ FixtureContext.php - Performs tear-down tasks after a test scenario.
1 method overrides FixtureBase::tearDown()
- FixtureContext::tearDown in tests/
src/ FixtureContext.php - Performs tear-down tasks after a test scenario.
File
- tests/
src/ FixtureBase.php, line 240
Class
- FixtureBase
- Base class for contexts which set up and tear down a complete test fixture.
Namespace
Drupal\Tests\lightning_coreCode
protected function tearDown() {
$this
->clearUserContent();
while ($this->entities) {
array_pop($this->entities)
->delete();
}
foreach ($this->config as $id => $data) {
$this->container
->get('config.factory')
->getEditable($id)
->setData($data)
->save(TRUE);
}
if ($this->themes) {
$this->container
->get('theme_installer')
->uninstall($this->themes);
}
if ($this->modules) {
$this->container
->get('module_installer')
->uninstall($this->modules);
}
}