You are here

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

Tests the install command with an invalid profile.

File

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

Class

QuickStartTest
Tests the quick-start commands.

Namespace

Drupal\Tests\Core\Command

Code

public function testQuickStartCommandProfileValidation() {

  // Install a site using the standard profile to ensure the one time login
  // link generation works.
  $install_command = [
    $this->php,
    'core/scripts/drupal',
    'quick-start',
    'umami',
    "--site-name='Test site {$this->testDb->getDatabasePrefix()}' --suppress-login",
  ];
  $process = new Process($install_command, NULL, [
    'DRUPAL_DEV_SITE_PATH' => $this->testDb
      ->getTestSitePath(),
  ]);
  $process
    ->inheritEnvironmentVariables();
  $process
    ->run();
  $this
    ->assertContains('\'umami\' is not a valid install profile. Did you mean \'demo_umami\'?', $process
    ->getErrorOutput());
}