public function Fixtures::tearDown in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::tearDown()
- 10 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 304 
Class
- Fixtures
- Convenience class for creating fixtures.
Namespace
Drupal\Tests\Composer\Plugin\ScaffoldCode
public function tearDown() : void {
  // 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=');
}