function InstallerTest::setUpProfile

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php \Drupal\FunctionalTests\Installer\InstallerTest::setUpProfile()
  2. 8.9.x core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php \Drupal\FunctionalTests\Installer\InstallerTest::setUpProfile()
  3. 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php \Drupal\FunctionalTests\Installer\InstallerTest::setUpProfile()

Overrides InstallerTestBase::setUpProfile

File

core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php, line 72

Class

InstallerTest
Tests the interactive installer.

Namespace

Drupal\FunctionalTests\Installer

Code

protected function setUpProfile() {
    $settings_services_file = DRUPAL_ROOT . '/sites/default/default.services.yml';
    // Copy the testing-specific service overrides in place.
    copy($settings_services_file, $this->siteDirectory . '/services.yml');
    PerformanceTestRecorder::registerService($this->siteDirectory . '/services.yml', TRUE);
    // Assert that the expected title is present.
    $this->assertEquals('Select an installation profile', $this->cssSelect('main h2')[0]
        ->getText());
    // Verify that Title/Label are not displayed when '#title_display' =>
    // 'invisible' attribute is set.
    $this->assertSession()
        ->elementsCount('xpath', "//span[contains(@class, 'visually-hidden') and contains(text(), 'Select an installation profile')]", 1);
    parent::setUpProfile();
}

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