function InstallerExistingSettingsReadOnlyMismatchProfileTest::visitInstaller

Overrides InstallerTestBase::visitInstaller

File

core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsReadOnlyMismatchProfileTest.php, line 67

Class

InstallerExistingSettingsReadOnlyMismatchProfileTest
Tests installer breaks with a profile mismatch and a read-only settings.php.

Namespace

Drupal\FunctionalTests\Installer

Code

protected function visitInstaller() {
    // Make settings file not writable. This will break the installer.
    $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);
    $this->drupalGet($GLOBALS['base_url'] . '/core/install.php?langcode=en&profile=testing');
}

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