// Re-enable permissions enforcement.
$settings = Settings::
getAll();
$settings['skip_permissions_hardening'
] = FALSE;
new Settings($settings);
// Manually trigger the requirements check.
$requirements =
$this->
checkSystemRequirements();
$this->
assertEquals('Protected',
(string) $requirements['configuration_files'
]['value'
]);
// Verify that site directory and the settings.php remain protected when
// automatically enforcing file permissions is enabled.
$this->
assertDirectoryIsNotWritable($site_path);
$this->
assertFileIsNotWritable($settings_file);
} /**
* Checks system runtime requirements.
*
* @return array
* An array of system requirements.
*/
protected function checkSystemRequirements() { \Drupal::
moduleHandler()->
loadInclude('system', 'install'
);