function BuildTestBase::tearDown
Same name in other branches
- 9 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::tearDown()
- 10 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::tearDown()
- 11.x core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::tearDown()
File
-
core/
tests/ Drupal/ BuildTests/ Framework/ BuildTestBase.php, line 171
Class
- BuildTestBase
- Provides a workspace to test build processes.
Namespace
Drupal\BuildTests\FrameworkCode
protected function tearDown() {
parent::tearDown();
$this->stopServer();
foreach ($this->portLocks as $lock) {
$lock->release();
}
$ws = $this->getWorkspaceDirectory();
$fs = new SymfonyFilesystem();
if ($this->destroyBuild && $fs->exists($ws)) {
// Filter out symlinks as chmod cannot alter them.
$finder = new Finder();
$finder->in($ws)
->directories()
->ignoreVCS(FALSE)
->ignoreDotFiles(FALSE)
->notPath('/^vendor\\/bin\\/composer$/');
$fs->chmod($finder->getIterator(), 0775, 00);
$fs->remove($ws);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.