function QuickStartTest::tearDown

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Command/QuickStartTest.php \Drupal\Tests\Core\Command\QuickStartTest::tearDown()
  2. 8.9.x core/tests/Drupal/Tests/Core/Command/QuickStartTest.php \Drupal\Tests\Core\Command\QuickStartTest::tearDown()
  3. 11.x core/tests/Drupal/Tests/Core/Command/QuickStartTest.php \Drupal\Tests\Core\Command\QuickStartTest::tearDown()

File

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

Class

QuickStartTest
Tests the quick-start commands.

Namespace

Drupal\Tests\Core\Command

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

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