You are here

public function QuickStartTestBase::installQuickStart in Automatic Updates 8

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.

2 calls to QuickStartTestBase::installQuickStart()
InPlaceUpdateTest::testContribUpdate in tests/src/Build/InPlaceUpdateTest.php
@covers ::update @dataProvider contribProjectsProvider
QuickStartTestBase::installCore in tests/src/Build/QuickStart/QuickStartTestBase.php
Prepare core for testing.

File

tests/src/Build/QuickStart/QuickStartTestBase.php, line 41

Class

QuickStartTestBase
Helper methods for using the quickstart feature of Drupal.

Namespace

Drupal\Tests\automatic_updates\Build\QuickStart

Code

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