diff --git a/core/modules/system/src/Tests/System/SitesDirectoryHardeningTest.php b/core/modules/system/src/Tests/System/SitesDirectoryHardeningTest.php
index d8f2c58..eca6054 100644
--- a/core/modules/system/src/Tests/System/SitesDirectoryHardeningTest.php
+++ b/core/modules/system/src/Tests/System/SitesDirectoryHardeningTest.php
@@ -8,74 +8,62 @@
 namespace Drupal\system\Tests\System;
 
 use Drupal\Core\Site\Settings;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\simpletest\WebTestBase;
 
 /**
- * Test unicode handling features implemented in unicode.inc.
+ * Tests Drupal permissions hardening of /sites subdirectories.
  *
  * @group system
  */
 class SitesDirectoryHardeningTest extends WebTestBase {
+  use StringTranslationTrait;
 
-  public static function getInfo() {
-    return array(
-      'name' => 'Sites directory hardening',
-      'description' => 'Tests Drupal permissions hardening of /sites subdirectories.',
-      'group' => 'System',
-    );
-  }
 
   /**
    * Test that the default behavior to restrict permissions on the current
    * sites directory and on settings.php is enforced.
    */
-  function testSitesDirectoryHardening() {
+  public function testSitesDirectoryHardening() {
     $site_path = $this->kernel->getSitePath();
-    $settings_file = $site_path . '/settings.php';
+    $settings_file = $this->settingsFile($site_path);
 
     // First, we check based on what the initial install has set.
-    $this->assertTrue(drupal_verify_install_file($site_path, FILE_NOT_WRITABLE, 'dir'), t('Verified permissions for !file.', array('!file' => $site_path)));
+    $this->assertTrue(drupal_verify_install_file($site_path, FILE_NOT_WRITABLE, 'dir'), $this->t('Verified permissions for @file.', array('@file' => $site_path)));
 
     // We intentionally don't check for settings.local.php as that file is
     // not created by Drupal.
-    $this->assertTrue(drupal_verify_install_file($settings_file, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE), t('Verified permissions for !file.', array('!file' => $settings_file)));
-
-    // Intentionally make our sites directory and settings.php writable.
-    chmod($site_path, 0744);
-    chmod($settings_file, 0744);
+    $this->assertTrue(drupal_verify_install_file($settings_file, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE), $this->t('Verified permissions for @file.', array('@file' => $settings_file)));
 
-    // Manually trigger the requirements check.
-    module_load_install('system');
-    system_requirements('runtime');
+    $this->makeWritable($site_path);
+    $this->checkSystemRequirements();
 
-    $this->assertTrue(drupal_verify_install_file($site_path, FILE_NOT_WRITABLE, 'dir'), t('Verified permissions for !file after manual permissions change.', array('!file' => $site_path)));
-    $this->assertTrue(drupal_verify_install_file($settings_file, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE), t('Verified permissions for !file after manual permissions change.', array('!file' => $settings_file)));
+    $this->assertTrue(drupal_verify_install_file($site_path, FILE_NOT_WRITABLE, 'dir'), $this->t('Verified permissions for @file after manual permissions change.', array('@file' => $site_path)));
+    $this->assertTrue(drupal_verify_install_file($settings_file, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE), $this->t('Verified permissions for @file after manual permissions change.', array('@file' => $settings_file)));
   }
 
   /**
    * Test that when when directory hardening is disabled that a writable file
    * remains writable.
    */
-  function testSitesDirectoryHardeningConfig() {
+  public function testSitesDirectoryHardeningConfig() {
     $site_path = $this->kernel->getSitePath();
-    $settings_file = $site_path . '/settings.php';
+    $settings_file = $this->settingsFile($site_path);
 
     // Disable permissions enforcement.
     $settings = Settings::getAll();
     $settings['skip_permissions_hardening'] = TRUE;
     new Settings($settings);
-    $this->assertTrue(Settings::get('skip_permissions_hardening'), 'Able to set to true');
-
-    // Intentionally make our sites directory and settings.php writable.
-    chmod($site_path, 0744);
-    chmod($settings_file, 0744);
+    $this->assertTrue(Settings::get('skip_permissions_hardening'), $this->t('Able to set hardening to true'));
+    $this->makeWritable($site_path);
 
     // Manually trigger the requirements check.
-    module_load_install('system');
-    system_requirements('runtime');
+    $requirements = $this->checkSystemRequirements();
+    $this->assertEqual(REQUIREMENT_WARNING, $requirements['configuration_files']['severity'], $this->t('Warning severity is properly set.'));
+    $this->assertEqual($this->t('Protection disabled'), (string) $requirements['configuration_files']['description']['#context']['configuration_error_list']['#items'][0], $this->t('Description is properly set.'));
 
-    $this->assertTrue(is_writable($site_path), t('Site directory remains writable when automatically fixing permissions is disabled.'));
-    $this->assertTrue(is_writable($settings_file), t('settings.php remains writable when automatically fixing permissions is disabled.'));
+    $this->assertTrue(is_writable($site_path), $this->t('Site directory remains writable when automatically fixing permissions is disabled.'));
+    $this->assertTrue(is_writable($settings_file), $this->t('settings.php remains writable when automatically fixing permissions is disabled.'));
 
     // Re-enable permissions enforcement.
     $settings = Settings::getAll();
@@ -83,10 +71,45 @@ function testSitesDirectoryHardeningConfig() {
     new Settings($settings);
 
     // Manually trigger the requirements check.
+    $this->checkSystemRequirements();
+
+    $this->assertFalse(is_writable($site_path), $this->t('Site directory is protected when automatically fixing permissions is enabled.'));
+    $this->assertFalse(is_writable($settings_file), $this->t('settings.php is protected when automatically fixing permissions is enabled.'));
+  }
+
+  /**
+   * Check system runtime requirements.
+   *
+   * @return array
+   *   An array of system requirements.
+   */
+  protected function checkSystemRequirements() {
     module_load_install('system');
-    system_requirements('runtime');
+    return system_requirements('runtime');
+  }
+
+  /**
+   * Make the given path and settings file writable.
+   *
+   * @param string $site_path
+   *   The sites directory path, such as 'sites/default'.
+   */
+  protected function makeWritable($site_path) {
+    chmod($site_path, 0755);
+    chmod($this->settingsFile($site_path), 0644);
+  }
 
-    $this->assertFalse(is_writable($site_path), t('Site directory is protected when automatically fixing permissions is enabled.'));
-    $this->assertFalse(is_writable($settings_file), t('settings.php is protected when automatically fixing permissions is enabled.'));
+  /**
+   * Return the path to settings.php
+   *
+   * @param string $site_path
+   *   The sites subdirectory path.
+   *
+   * @return string
+   *   The path to settings.php.
+   */
+  protected function settingsFile($site_path) {
+    $settings_file = $site_path . '/settings.php';
+    return $settings_file;
   }
 }
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index f3b348c..d8d7fb2 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -369,18 +369,18 @@ function system_requirements($phase) {
     // directory. This allows additional files in the site directory to be
     // updated when they are managed in a version control system.
     if (Settings::get('skip_permissions_hardening')) {
-      $message = t('Protection disabled');
+      $conf_errors[] = t('Protection disabled');
       $severity = REQUIREMENT_WARNING;
     }
     elseif (!drupal_verify_install_file($site_path, FILE_NOT_WRITABLE, 'dir')) {
-      $message = t('Not protected');
-      $severity = REQUIREMENT_ERROR;
       $conf_errors[] = t("The directory %file is not protected from modifications and poses a security risk. You must change the directory's permissions to be non-writable.", array('%file' => $site_path));
+      $severity = REQUIREMENT_ERROR;
     }
     foreach (array('settings.php', 'settings.local.php', 'services.yml') as $conf_file) {
       $full_path = $site_path . '/' . $conf_file;
       if (file_exists($full_path) && (Settings::get('skip_permissions_hardening') || !drupal_verify_install_file($full_path, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE))) {
         $conf_errors[] = t("The file %file is not protected from modifications and poses a security risk. You must change the file's permissions to be non-writable.", array('%file' => $full_path));
+        $severity = min($severity, REQUIREMENT_ERROR);
       }
     }
     if (!empty($conf_errors)) {
@@ -402,7 +402,7 @@ function system_requirements($phase) {
       }
       $requirements['configuration_files'] = array(
         'value' => t('Not protected'),
-        'severity' => REQUIREMENT_ERROR,
+        'severity' => $severity,
         'description' => $description,
       );
     }
