function QuickStartTest::testServerWithNoInstall

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

Tests the server command when there is no installation.

File

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

Class

QuickStartTest
Tests the quick-start commands.

Namespace

Drupal\Tests\Core\Command

Code

public function testServerWithNoInstall() : void {
  $server_command = [
    $this->php,
    'core/scripts/drupal',
    'server',
    '--suppress-login',
  ];
  $server_process = new Process($server_command, NULL, [
    'DRUPAL_DEV_SITE_PATH' => $this->testDb
      ->getTestSitePath(),
  ]);
  $server_process->run();
  $this->assertStringContainsString('No installation found. Use the \'install\' command.', $server_process->getErrorOutput());
}

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