You are here

public function QuickStartTest::testQuickStartCommandProfileValidation in Drupal 9

Same name and namespace in other branches
  1. 8 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 264

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
    ->run();
  $this
    ->assertStringContainsString('\'umami\' is not a valid install profile. Did you mean \'demo_umami\'?', $process
    ->getErrorOutput());
}