function RecipeQuickStartTest::tearDown

Same name in this branch
  1. 11.x core/tests/Drupal/Tests/Core/Recipe/RecipeQuickStartTest.php \Drupal\Tests\Core\Recipe\RecipeQuickStartTest::tearDown()
Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Recipe/RecipeQuickStartTest.php \Drupal\Tests\Core\Recipe\RecipeQuickStartTest::tearDown()

Overrides BuildTestBase::tearDown

File

core/tests/Drupal/BuildTests/QuickStart/RecipeQuickStartTest.php, line 72

Class

RecipeQuickStartTest
Tests the quick-start command with recipes.

Namespace

Drupal\BuildTests\QuickStart

Code

protected function tearDown() : void {
  if ($this->testDb) {
    $test_site_directory = $this->root . DIRECTORY_SEPARATOR . $this->testDb
      ->getTestSitePath();
    if (file_exists($test_site_directory)) {
      // @todo use the tear down command from
      //   https://www.drupal.org/project/drupal/issues/2926633
      // Delete test site directory.
      $this->fileUnmanagedDeleteRecursive($test_site_directory, BrowserTestBase::filePreDeleteCallback(...));
    }
  }
  parent::tearDown();
}

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