You are here

public function QuickStartTest::tearDown in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Command/QuickStartTest.php \Drupal\Tests\Core\Command\QuickStartTest::tearDown()

File

core/tests/Drupal/Tests/Core/Command/QuickStartTest.php, line 67

Class

QuickStartTest
Tests the quick-start commands.

Namespace

Drupal\Tests\Core\Command

Code

public function tearDown() {
  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::class,
        'filePreDeleteCallback',
      ]);
    }
  }
  parent::tearDown();
}