function FixturesBase::tearDown

Calls 'tearDown' in any test that copies fixtures to transient locations.

File

core/tests/Drupal/Tests/Composer/Plugin/FixturesBase.php, line 199

Class

FixturesBase
Base class for fixtures to test composer plugins.

Namespace

Drupal\Tests\Composer\Plugin

Code

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=');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.