You are here

protected function QuickStartTest::setUp in Drupal 10

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

File

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

Class

QuickStartTest
Tests the quick-start commands.

Namespace

Drupal\Tests\Core\Command

Code

protected function setUp() : void {
  parent::setUp();
  $php_executable_finder = new PhpExecutableFinder();
  $this->php = $php_executable_finder
    ->find();
  $this->root = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__)), 2);
  chdir($this->root);
  if (!is_writable("{$this->root}/sites/simpletest")) {
    $this
      ->markTestSkipped('This test requires a writable sites/simpletest directory');
  }

  // Get a lock and a valid site path.
  $this->testDb = new TestDatabase();
}