function QuickStartTest::testQuickStartCommandProfileValidation

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Command/QuickStartTest.php \Drupal\Tests\Core\Command\QuickStartTest::testQuickStartCommandProfileValidation()
  2. 8.9.x core/tests/Drupal/Tests/Core/Command/QuickStartTest.php \Drupal\Tests\Core\Command\QuickStartTest::testQuickStartCommandProfileValidation()
  3. 11.x 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 226

Class

QuickStartTest
Tests the quick-start commands.

Namespace

Drupal\Tests\Core\Command

Code

public function testQuickStartCommandProfileValidation() : void {
    // 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->assertMatchesRegularExpression("/'umami' is not a valid install profile or recipe\\. Did you mean \\W*'demo_umami'?/", $process->getErrorOutput());
}

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