X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FFunctionalTests%2FInstaller%2FInstallerSkipPermissionHardeningTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FFunctionalTests%2FInstaller%2FInstallerSkipPermissionHardeningTest.php;h=5a09571b3993313bc88830f9928ae831105dfc9c;hp=0000000000000000000000000000000000000000;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php b/web/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php new file mode 100644 index 000000000..5a09571b3 --- /dev/null +++ b/web/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php @@ -0,0 +1,41 @@ +settings['settings']['skip_permissions_hardening'] = (object) ['value' => TRUE, 'required' => TRUE]; + } + + /** + * {@inheritdoc} + */ + protected function setUpSite() { + $site_directory = $this->container->get('app.root') . '/' . $this->siteDirectory; + $this->assertTrue(is_writable($site_directory)); + $this->assertTrue(is_writable($site_directory . '/settings.php')); + + $this->assertSession()->responseContains('All necessary changes to ' . $this->siteDirectory . ' and ' . $this->siteDirectory . '/settings.php 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 online handbook.'); + + parent::setUpSite(); + } + + /** + * Verifies the expected behaviors of the installation result. + */ + public function testInstalled() { + $this->assertSession()->addressEquals('user/1'); + $this->assertSession()->statusCodeEquals(200); + } + +}