You are here

public function QuickStartTest::setUp 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::setUp()

File

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

Class

QuickStartTest
Tests the quick-start commands.

Namespace

Drupal\Tests\Core\Command

Code

public function setUp() {
  parent::setUp();
  $php_executable_finder = new PhpExecutableFinder();
  $this->php = $php_executable_finder
    ->find();
  $this->root = dirname(dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__))));
  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();
  include $this->root . '/core/includes/bootstrap.inc';
}