More updates to stop using dev or alpha or beta versions.
[yaffs-website] / web / core / modules / system / src / Tests / Installer / InstallerExistingConfigDirectoryTest.php
1 <?php
2
3 namespace Drupal\system\Tests\Installer;
4
5 use Drupal\simpletest\InstallerTestBase;
6
7 /**
8  * Tests the installer when a config_directory has already been set up.
9  *
10  * @group Installer
11  */
12 class InstallerExistingConfigDirectoryTest extends InstallerTestBase {
13
14   /**
15    * The expected file perms of the folder.
16    *
17    * @var int
18    */
19   protected $expectedFilePerms;
20
21   /**
22    * {@inheritdoc}
23    */
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',
29       'required' => TRUE,
30     ];
31     parent::setUp();
32   }
33
34   /**
35    * Verifies that installation succeeded.
36    */
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.');
42   }
43
44 }