function QuickStartTestBase::installQuickStart

Same name in other branches
  1. 9 core/tests/Drupal/BuildTests/QuickStart/QuickStartTestBase.php \Drupal\BuildTests\QuickStart\QuickStartTestBase::installQuickStart()
  2. 8.9.x core/tests/Drupal/BuildTests/QuickStart/QuickStartTestBase.php \Drupal\BuildTests\QuickStart\QuickStartTestBase::installQuickStart()
  3. 10 core/tests/Drupal/BuildTests/QuickStart/QuickStartTestBase.php \Drupal\BuildTests\QuickStart\QuickStartTestBase::installQuickStart()

Install a Drupal site using the quick start feature.

Parameters

string $profile: Drupal profile to install.

string $working_dir: (optional) A working directory relative to the workspace, within which to execute the command. Defaults to the workspace directory.

4 calls to QuickStartTestBase::installQuickStart()
GenerateThemeTest::test in core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php
Tests the generate-theme command.
GenerateThemeTest::test in core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php
Tests the generate-theme command.
HtRouterTest::testHtRouter in core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php
@covers ::instantiateServer
TemplateProjectTestBase::installQuickStart in core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php
Install a Drupal site using the quick start feature.
1 method overrides QuickStartTestBase::installQuickStart()
TemplateProjectTestBase::installQuickStart in core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php
Install a Drupal site using the quick start feature.

File

core/tests/Drupal/BuildTests/QuickStart/QuickStartTestBase.php, line 38

Class

QuickStartTestBase
Helper methods for using the quickstart feature of Drupal.

Namespace

Drupal\BuildTests\QuickStart

Code

public function installQuickStart($profile, $working_dir = NULL) {
    $php_finder = new PhpExecutableFinder();
    $install_process = $this->executeCommand($php_finder->find() . ' ./core/scripts/drupal install ' . $profile, $working_dir);
    $this->assertCommandOutputContains('Username:');
    preg_match('/Username: (.+)\\vPassword: (.+)/', $install_process->getOutput(), $matches);
    $this->assertNotEmpty($this->adminUsername = $matches[1]);
    $this->assertNotEmpty($this->adminPassword = $matches[2]);
}

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