function Fixtures::tearDown
Same name in other branches
- 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::tearDown()
- 8.9.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::tearDown()
- 11.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::tearDown()
Calls 'tearDown' in any test that copies fixtures to transient locations.
File
-
core/
tests/ Drupal/ Tests/ Composer/ Plugin/ Scaffold/ Fixtures.php, line 306
Class
- Fixtures
- Convenience class for creating fixtures.
Namespace
Drupal\Tests\Composer\Plugin\ScaffoldCode
public function tearDown() {
// Remove any temporary directories that were created.
$filesystem = new Filesystem();
foreach ($this->tmpDirs as $dir) {
$filesystem->remove($dir);
}
// Clear out variables from the previous pass.
$this->tmpDirs = [];
$this->io = NULL;
// Clear the composer cache dir, if it was set
putenv('COMPOSER_CACHE_DIR=');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.