public function QuickStartTestBase::installQuickStart in Drupal 8
Same name and namespace in other branches
- 9 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.
1 call to QuickStartTestBase::installQuickStart()
- HtRouterTest::testHtRouter in core/
tests/ Drupal/ BuildTests/ Framework/ Tests/ HtRouterTest.php - @covers ::instantiateServer
File
- core/
tests/ Drupal/ BuildTests/ QuickStart/ QuickStartTestBase.php, line 36
Class
- QuickStartTestBase
- Helper methods for using the quickstart feature of Drupal.
Namespace
Drupal\BuildTests\QuickStartCode
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]);
}