function BuildTestBase::tearDown

5 calls to BuildTestBase::tearDown()
ComposerHookTest::tearDown in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php
QuickStartTest::tearDown in core/tests/Drupal/BuildTests/QuickStart/QuickStartTest.php
RecipeQuickStartTest::tearDown in core/tests/Drupal/BuildTests/QuickStart/RecipeQuickStartTest.php
TemplateProjectTestBase::tearDown in core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php
Invokes the test preconditions assertion after each test run.
UnpackRecipeTest::tearDown in core/tests/Drupal/BuildTests/Composer/Plugin/Unpack/Functional/UnpackRecipeTest.php
4 methods override BuildTestBase::tearDown()
ComposerHookTest::tearDown in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php
QuickStartTest::tearDown in core/tests/Drupal/BuildTests/QuickStart/QuickStartTest.php
RecipeQuickStartTest::tearDown in core/tests/Drupal/BuildTests/QuickStart/RecipeQuickStartTest.php
UnpackRecipeTest::tearDown in core/tests/Drupal/BuildTests/Composer/Plugin/Unpack/Functional/UnpackRecipeTest.php

File

core/tests/Drupal/BuildTests/Framework/BuildTestBase.php, line 178

Class

BuildTestBase
Provides a workspace to test build processes.

Namespace

Drupal\BuildTests\Framework

Code

protected function tearDown() : void {
  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.