Skip to content
Snippets Groups Projects

Issue #3364748: Add test coverage for the permissions handling that SiteConfigurationExcluder does for `sites/default`

Merged Issue #3364748: Add test coverage for the permissions handling that SiteConfigurationExcluder does for `sites/default`
Merged Adam G-H requested to merge issue/automatic_updates-3364748:sites-default-test into 3.0.x
@@ -80,6 +80,26 @@ class SiteConfigurationExcluderTest extends PackageManagerKernelTestBase {
}
}
/**
* Tests that `sites/default` is made writable in the stage directory.
*/
public function testDefaultSiteDirectoryPermissions(): void {
$project_root = $this->container->get(PathLocator::class)
->getProjectRoot();
$live_dir = $project_root . '/sites/default';
chmod($live_dir, 0555);
$this->assertDirectoryIsNotWritable($live_dir);
$stage = $this->createStage();
$stage->create();
$staged_dir = $stage->getStageDirectory() . '/sites/default';
$this->assertDirectoryIsWritable($staged_dir);
$stage->require(['ext-json:*']);
$stage->apply();
$this->assertDirectoryIsNotWritable($live_dir);
}
}
/**
Loading