3 namespace Drupal\system\Tests\Installer;
5 use Drupal\simpletest\InstallerTestBase;
8 * Tests the installer when a config_directory has already been set up.
12 class InstallerExistingConfigDirectoryTest extends InstallerTestBase {
15 * The expected file perms of the folder.
19 protected $expectedFilePerms;
24 protected function setUp() {
25 mkdir($this->siteDirectory . '/config_read_only', 0444);
26 $this->expectedFilePerms = fileperms($this->siteDirectory . '/config_read_only');
27 $this->settings['config_directories'][CONFIG_SYNC_DIRECTORY] = (object) [
28 'value' => $this->siteDirectory . '/config_read_only',
35 * Verifies that installation succeeded.
37 public function testInstaller() {
38 $this->assertUrl('user/1');
39 $this->assertResponse(200);
40 $this->assertEqual($this->expectedFilePerms, fileperms($this->siteDirectory . '/config_read_only'));
41 $this->assertEqual([], glob($this->siteDirectory . '/config_read_only/*'), 'The sync directory is empty after install because it is read-only.');