3 namespace Drupal\FunctionalTests\Installer;
6 * Verifies that the installer skipped permission hardening.
10 class InstallerSkipPermissionHardeningTest extends InstallerTestBase {
15 protected function prepareEnvironment() {
16 parent::prepareEnvironment();
17 $this->settings['settings']['skip_permissions_hardening'] = (object) ['value' => TRUE, 'required' => TRUE];
23 protected function setUpSite() {
24 $site_directory = $this->container->get('app.root') . '/' . $this->siteDirectory;
25 $this->assertTrue(is_writable($site_directory));
26 $this->assertTrue(is_writable($site_directory . '/settings.php'));
28 $this->assertSession()->responseContains('All necessary changes to <em class="placeholder">' . $this->siteDirectory . '</em> and <em class="placeholder">' . $this->siteDirectory . '/settings.php</em> have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, consult the <a href="https://www.drupal.org/server-permissions">online handbook</a>.');
34 * Verifies the expected behaviors of the installation result.
36 public function testInstalled() {
37 $this->assertSession()->addressEquals('user/1');
38 $this->assertSession()->statusCodeEquals(200);