3 namespace Drupal\FunctionalTests\Installer;
6 * Tests the installer when a config_directory has already been set up.
10 class InstallerExistingConfigDirectoryTest extends InstallerTestBase {
13 * The expected file perms of the folder.
17 protected $expectedFilePerms;
22 protected function prepareEnvironment() {
23 parent::prepareEnvironment();
24 mkdir($this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/config_read_only', 0444);
25 $this->expectedFilePerms = fileperms($this->siteDirectory . '/config_read_only');
26 $this->settings['config_directories'][CONFIG_SYNC_DIRECTORY] = (object) [
27 'value' => $this->siteDirectory . '/config_read_only',
33 * Verifies that installation succeeded.
35 public function testInstaller() {
36 $this->assertUrl('user/1');
37 $this->assertResponse(200);
38 $this->assertEqual($this->expectedFilePerms, fileperms($this->siteDirectory . '/config_read_only'));
39 $this->assertEqual([], glob($this->siteDirectory . '/config_read_only/*'), 'The sync directory is empty after install because it is read-only.');