You are here

protected function DistributionProfileExistingSettingsTest::setUpLanguage in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php \Drupal\FunctionalTests\Installer\DistributionProfileExistingSettingsTest::setUpLanguage()

Installer step: Select language.

Overrides InstallerTestBase::setUpLanguage

File

core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php, line 82

Class

DistributionProfileExistingSettingsTest
Tests distribution profile support with existing settings.

Namespace

Drupal\FunctionalTests\Installer

Code

protected function setUpLanguage() {

  // Make settings file not writable.
  $filename = $this->siteDirectory . '/settings.php';

  // Make the settings file read-only.
  // Not using File API; a potential error must trigger a PHP warning.
  chmod($filename, 0444);

  // Verify that the distribution name appears.
  $this
    ->assertRaw($this->info['distribution']['name']);

  // Verify that the requested theme is used.
  $this
    ->assertRaw($this->info['distribution']['install']['theme']);

  // Verify that the "Choose profile" step does not appear.
  $this
    ->assertNoText('profile');
  parent::setUpLanguage();
}