diff --git a/core/modules/file/src/Tests/FileFieldPathTest.php b/core/modules/file/src/Tests/FileFieldPathTest.php
index bf166ed..6de342a 100644
--- a/core/modules/file/src/Tests/FileFieldPathTest.php
+++ b/core/modules/file/src/Tests/FileFieldPathTest.php
@@ -57,7 +57,7 @@ function testUploadPath() {
     $node_file = file_load($node->{$field_name}->target_id);
     // Do token replacement using the same user which uploaded the file, not
     // the user running the test case.
-    $data = array('user' => $this->admin_user);
+    $data = array('user' => $this->adminUser);
     $subdirectory = \Drupal::token()->replace('[user:uid]/[user:name]', $data);
     $this->assertPathMatch('public://' . $subdirectory . '/' . $test_file->getFilename(), $node_file->getFileUri(), format_string('The file %file was uploaded to the correct path with token replacements.', array('%file' => $node_file->getFileUri())));
   }
diff --git a/core/modules/file/src/Tests/FileFieldTestBase.php b/core/modules/file/src/Tests/FileFieldTestBase.php
index 0cf36c3..f8bfb41 100644
--- a/core/modules/file/src/Tests/FileFieldTestBase.php
+++ b/core/modules/file/src/Tests/FileFieldTestBase.php
@@ -22,15 +22,20 @@
   *
   * @var array
   */
-  public static $modules = array('node', 'file', 'file_module_test', 'field_ui');
+  public static $modules = ['node', 'file', 'file_module_test', 'field_ui'];
 
-  protected $admin_user;
+  /**
+   * An user with administration permissions.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
 
   protected function setUp() {
     parent::setUp();
-    $this->admin_user = $this->drupalCreateUser(array('access content', 'access administration pages', 'administer site configuration', 'administer users', 'administer permissions', 'administer content types', 'administer node fields', 'administer node display', 'administer nodes', 'bypass node access'));
-    $this->drupalLogin($this->admin_user);
-    $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    $this->adminUser = $this->drupalCreateUser(['access content', 'access administration pages', 'administer site configuration', 'administer users', 'administer permissions', 'administer content types', 'administer node fields', 'administer node display', 'administer nodes', 'bypass node access']);
+    $this->drupalLogin($this->adminUser);
+    $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
   }
 
   /**
@@ -69,7 +74,7 @@ function getLastFileId() {
    * @param $widget_settings
    *   A list of widget settings that will be added to the widget defaults.
    */
-  function createFileField($name, $entity_type, $bundle, $storage_settings = array(), $field_settings = array(), $widget_settings = array()) {
+  function createFileField($name, $entity_type, $bundle, $storage_settings = [], $field_settings = [], $widget_settings = []) {
     $field_storage = entity_create('field_storage_config', array(
       'entity_type' => $entity_type,
       'field_name' => $name,
@@ -97,36 +102,36 @@ function createFileField($name, $entity_type, $bundle, $storage_settings = array
    * @param $widget_settings
    *   A list of widget settings that will be added to the widget defaults.
    */
-  function attachFileField($name, $entity_type, $bundle, $field_settings = array(), $widget_settings = array()) {
-    $field = array(
+  function attachFileField($name, $entity_type, $bundle, $field_settings = [], $widget_settings = []) {
+    $field = [
       'field_name' => $name,
       'label' => $name,
       'entity_type' => $entity_type,
       'bundle' => $bundle,
       'required' => !empty($field_settings['required']),
       'settings' => $field_settings,
-    );
+    ];
     entity_create('field_config', $field)->save();
 
     entity_get_form_display($entity_type, $bundle, 'default')
-      ->setComponent($name, array(
+      ->setComponent($name, [
         'type' => 'file_generic',
         'settings' => $widget_settings,
-      ))
+      ])
       ->save();
     // Assign display settings.
     entity_get_display($entity_type, $bundle, 'default')
-      ->setComponent($name, array(
+      ->setComponent($name, [
         'label' => 'hidden',
         'type' => 'file_default',
-      ))
+      ])
       ->save();
   }
 
   /**
    * Updates an existing file field with new settings.
    */
-  function updateFileField($name, $type_name, $field_settings = array(), $widget_settings = array()) {
+  function updateFileField($name, $type_name, $field_settings = [], $widget_settings = []) {
     $field = FieldConfig::loadByName('node', $type_name, $name);
     $field->settings = array_merge($field->settings, $field_settings);
     $field->save();
@@ -141,7 +146,7 @@ function updateFileField($name, $type_name, $field_settings = array(), $widget_s
   /**
    * Uploads a file to a node.
    */
-  function uploadNodeFile($file, $field_name, $nid_or_type, $new_revision = TRUE, $extras = array()) {
+  function uploadNodeFile($file, $field_name, $nid_or_type, $new_revision = TRUE, $extras = []) {
     $edit = array(
       'title[0][value]' => $this->randomMachineName(),
       'revision' => (string) (int) $new_revision,
@@ -159,7 +164,7 @@ function uploadNodeFile($file, $field_name, $nid_or_type, $new_revision = TRUE,
       // Save at least one revision to better simulate a real site.
       $node->setNewRevision();
       $node->save();
-      $node_storage->resetCache(array($nid));
+      $node_storage->resetCache([$nid]);
       $node = $node_storage->load($nid);
       $this->assertNotEqual($nid, $node->getRevisionId(), 'Node revision exists.');
     }
@@ -186,7 +191,7 @@ function removeNodeFile($nid, $new_revision = TRUE) {
       'revision' => (string) (int) $new_revision,
     );
 
-    $this->drupalPostForm('node/' . $nid . '/edit', array(), t('Remove'));
+    $this->drupalPostForm('node/' . $nid . '/edit', [], t('Remove'));
     $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
   }
 
@@ -199,7 +204,7 @@ function replaceNodeFile($file, $field_name, $nid, $new_revision = TRUE) {
       'revision' => (string) (int) $new_revision,
     );
 
-    $this->drupalPostForm('node/' . $nid . '/edit', array(), t('Remove'));
+    $this->drupalPostForm('node/' . $nid . '/edit', [], t('Remove'));
     $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
   }
 
diff --git a/core/modules/file/src/Tests/FileFieldValidateTest.php b/core/modules/file/src/Tests/FileFieldValidateTest.php
index 21d93af..51d7402 100644
--- a/core/modules/file/src/Tests/FileFieldValidateTest.php
+++ b/core/modules/file/src/Tests/FileFieldValidateTest.php
@@ -17,8 +17,6 @@
  * @group file
  */
 class FileFieldValidateTest extends FileFieldTestBase {
-  protected $field;
-  protected $node_type;
 
   /**
    * Tests the required property on file fields.
diff --git a/core/modules/file/src/Tests/FileFieldWidgetTest.php b/core/modules/file/src/Tests/FileFieldWidgetTest.php
index c3ce5f0..8792237 100644
--- a/core/modules/file/src/Tests/FileFieldWidgetTest.php
+++ b/core/modules/file/src/Tests/FileFieldWidgetTest.php
@@ -27,7 +27,7 @@ class FileFieldWidgetTest extends FileFieldTestBase {
    *
    * @var array
    */
-  public static $modules = array('comment');
+  public static $modules = ['comment'];
 
   /**
    * Tests upload and remove buttons for a single-valued File field.
@@ -40,13 +40,13 @@ function testSingleValuedWidget() {
 
     $test_file = $this->getTestFile('text');
 
-    foreach (array('nojs', 'js') as $type) {
+    foreach (['nojs', 'js'] as $type) {
       // Create a new node with the uploaded file and ensure it got uploaded
       // successfully.
       // @todo This only tests a 'nojs' submission, because drupalPostAjaxForm()
       //   does not yet support file uploads.
       $nid = $this->uploadNodeFile($test_file, $field_name, $type_name);
-      $node_storage->resetCache(array($nid));
+      $node_storage->resetCache([$nid]);
       $node = $node_storage->load($nid);
       $node_file = file_load($node->{$field_name}->target_id);
       $this->assertFileExists($node_file, 'New file saved to disk on node creation.');
@@ -63,11 +63,11 @@ function testSingleValuedWidget() {
       // "Click" the remove button (emulating either a nojs or js submission).
       switch ($type) {
         case 'nojs':
-          $this->drupalPostForm(NULL, array(), t('Remove'));
+          $this->drupalPostForm(NULL, [], t('Remove'));
           break;
         case 'js':
           $button = $this->xpath('//input[@type="submit" and @value="' . t('Remove') . '"]');
-          $this->drupalPostAjaxForm(NULL, array(), array((string) $button[0]['name'] => (string) $button[0]['value']));
+          $this->drupalPostAjaxForm(NULL, [], [(string) $button[0]['name'] => (string) $button[0]['value']]);
           break;
       }
 
@@ -79,8 +79,8 @@ function testSingleValuedWidget() {
       $this->assertTrue(isset($label[0]), 'Label for upload found.');
 
       // Save the node and ensure it does not have the file.
-      $this->drupalPostForm(NULL, array(), t('Save and keep published'));
-      $node_storage->resetCache(array($nid));
+      $this->drupalPostForm(NULL, [], t('Save and keep published'));
+      $node_storage->resetCache([$nid]);
       $node = $node_storage->load($nid);
       $this->assertTrue(empty($node->{$field_name}->target_id), 'File was successfully removed from the node.');
     }
@@ -100,12 +100,12 @@ function testMultiValuedWidget() {
     // names).
     $field_name = 'test_file_field_1';
     $field_name2 = 'test_file_field_2';
-    $this->createFileField($field_name, 'node', $type_name, array('cardinality' => 3));
-    $this->createFileField($field_name2, 'node', $type_name, array('cardinality' => 3));
+    $this->createFileField($field_name, 'node', $type_name, ['cardinality' => 3]);
+    $this->createFileField($field_name2, 'node', $type_name, ['cardinality' => 3]);
 
     $test_file = $this->getTestFile('text');
 
-    foreach (array('nojs', 'js') as $type) {
+    foreach (['nojs', 'js'] as $type) {
       // Visit the node creation form, and upload 3 files for each field. Since
       // the field has cardinality of 3, ensure the "Upload" button is displayed
       // until after the 3rd file, and after that, isn't displayed. Because
@@ -115,9 +115,9 @@ function testMultiValuedWidget() {
       //   does not yet emulate jQuery's file upload.
       //
       $this->drupalGet("node/add/$type_name");
-      foreach (array($field_name2, $field_name) as $each_field_name) {
+      foreach ([$field_name2, $field_name] as $each_field_name) {
         for ($delta = 0; $delta < 3; $delta++) {
-          $edit = array('files[' . $each_field_name . '_' . $delta . '][]' => drupal_realpath($test_file->getFileUri()));
+          $edit = ['files[' . $each_field_name . '_' . $delta . '][]' => drupal_realpath($test_file->getFileUri())];
           // If the Upload button doesn't exist, drupalPostForm() will automatically
           // fail with an assertion message.
           $this->drupalPostForm(NULL, $edit, t('Upload'));
@@ -127,7 +127,7 @@ function testMultiValuedWidget() {
 
       $num_expected_remove_buttons = 6;
 
-      foreach (array($field_name, $field_name2) as $current_field_name) {
+      foreach ([$field_name, $field_name2] as $current_field_name) {
         // How many uploaded files for the current field are remaining.
         $remaining = 3;
         // Test clicking each "Remove" button. For extra robustness, test them out
@@ -136,11 +136,11 @@ function testMultiValuedWidget() {
         // - First remove the 2nd file.
         // - Then remove what is then the 2nd file (was originally the 3rd file).
         // - Then remove the first file.
-        foreach (array(1,1,0) as $delta) {
+        foreach ([1, 1, 0] as $delta) {
           // Ensure we have the expected number of Remove buttons, and that they
           // are numbered sequentially.
           $buttons = $this->xpath('//input[@type="submit" and @value="Remove"]');
-          $this->assertTrue(is_array($buttons) && count($buttons) === $num_expected_remove_buttons, format_string('There are %n "Remove" buttons displayed (JSMode=%type).', array('%n' => $num_expected_remove_buttons, '%type' => $type)));
+          $this->assertTrue(is_array($buttons) && count($buttons) === $num_expected_remove_buttons, format_string('There are %n "Remove" buttons displayed (JSMode=%type).', ['%n' => $num_expected_remove_buttons, '%type' => $type]));
           foreach ($buttons as $i => $button) {
             $key = $i >= $remaining ? $i - $remaining : $i;
             $check_field_name = $field_name2;
@@ -167,12 +167,12 @@ function testMultiValuedWidget() {
                   $button['value'] = 'DUMMY';
                 }
               }
-              $this->drupalPostForm(NULL, array(), t('Remove'));
+              $this->drupalPostForm(NULL, [], t('Remove'));
               break;
             case 'js':
               // drupalPostAjaxForm() lets us target the button precisely, so we don't
               // require the workaround used above for nojs.
-              $this->drupalPostAjaxForm(NULL, array(), array($button_name => t('Remove')));
+              $this->drupalPostAjaxForm(NULL, [], [$button_name => t('Remove')]);
               break;
           }
           $num_expected_remove_buttons--;
@@ -181,25 +181,25 @@ function testMultiValuedWidget() {
           // Ensure an "Upload" button for the current field is displayed with the
           // correct name.
           $upload_button_name = $current_field_name . '_' . $remaining . '_upload_button';
-          $buttons = $this->xpath('//input[@type="submit" and @value="Upload" and @name=:name]', array(':name' => $upload_button_name));
-          $this->assertTrue(is_array($buttons) && count($buttons) == 1, format_string('The upload button is displayed with the correct name (JSMode=%type).', array('%type' => $type)));
+          $buttons = $this->xpath('//input[@type="submit" and @value="Upload" and @name=:name]', [':name' => $upload_button_name]);
+          $this->assertTrue(is_array($buttons) && count($buttons) == 1, format_string('The upload button is displayed with the correct name (JSMode=%type).', ['%type' => $type]));
 
           // Ensure only at most one button per field is displayed.
           $buttons = $this->xpath('//input[@type="submit" and @value="Upload"]');
           $expected = $current_field_name == $field_name ? 1 : 2;
-          $this->assertTrue(is_array($buttons) && count($buttons) == $expected, format_string('After removing a file, only one "Upload" button for each possible field is displayed (JSMode=%type).', array('%type' => $type)));
+          $this->assertTrue(is_array($buttons) && count($buttons) == $expected, format_string('After removing a file, only one "Upload" button for each possible field is displayed (JSMode=%type).', ['%type' => $type]));
         }
       }
 
       // Ensure the page now has no Remove buttons.
-      $this->assertNoFieldByXPath('//input[@type="submit"]', t('Remove'), format_string('After removing all files, there is no "Remove" button displayed (JSMode=%type).', array('%type' => $type)));
+      $this->assertNoFieldByXPath('//input[@type="submit"]', t('Remove'), format_string('After removing all files, there is no "Remove" button displayed (JSMode=%type).', ['%type' => $type]));
 
       // Save the node and ensure it does not have any files.
-      $this->drupalPostForm(NULL, array('title[0][value]' => $this->randomMachineName()), t('Save and publish'));
-      $matches = array();
+      $this->drupalPostForm(NULL, ['title[0][value]' => $this->randomMachineName()], t('Save and publish'));
+      $matches = [];
       preg_match('/node\/([0-9]+)/', $this->getUrl(), $matches);
       $nid = $matches[1];
-      $node_storage->resetCache(array($nid));
+      $node_storage->resetCache([$nid]);
       $node = $node_storage->load($nid);
       $this->assertTrue(empty($node->{$field_name}->target_id), 'Node was successfully saved without any files.');
     }
@@ -211,7 +211,7 @@ function testMultiValuedWidget() {
   function testPrivateFileSetting() {
     $node_storage = $this->container->get('entity.manager')->getStorage('node');
     // Grant the admin user required permissions.
-    user_role_grant_permissions($this->admin_user->roles[0]->target_id, array('administer node fields'));
+    user_role_grant_permissions($this->adminUser->roles[0]->target_id, ['administer node fields']);
 
     $type_name = 'article';
     $field_name = strtolower($this->randomMachineName());
@@ -221,10 +221,10 @@ function testPrivateFileSetting() {
     $test_file = $this->getTestFile('text');
 
     // Change the field setting to make its files private, and upload a file.
-    $edit = array('field_storage[settings][uri_scheme]' => 'private');
+    $edit = ['field_storage[settings][uri_scheme]' => 'private'];
     $this->drupalPostForm("admin/structure/types/manage/$type_name/fields/$field->id/storage", $edit, t('Save field settings'));
     $nid = $this->uploadNodeFile($test_file, $field_name, $type_name);
-    $node_storage->resetCache(array($nid));
+    $node_storage->resetCache([$nid]);
     $node = $node_storage->load($nid);
     $node_file = file_load($node->{$field_name}->target_id);
     $this->assertFileExists($node_file, 'New file saved to disk on node creation.');
@@ -248,41 +248,41 @@ function testPrivateFileSetting() {
    * Tests that download restrictions on private files work on comments.
    */
   function testPrivateFileComment() {
-    $user = $this->drupalCreateUser(array('access comments'));
+    $user = $this->drupalCreateUser(['access comments']);
 
     // Grant the admin user required comment permissions.
-    $roles = $this->admin_user->getRoles();
-    user_role_grant_permissions($roles[1], array('administer comment fields', 'administer comments'));
+    $roles = $this->adminUser->getRoles();
+    user_role_grant_permissions($roles[1], ['administer comment fields', 'administer comments']);
 
     // Revoke access comments permission from anon user, grant post to
     // authenticated.
-    user_role_revoke_permissions(DRUPAL_ANONYMOUS_RID, array('access comments'));
-    user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('post comments', 'skip comment approval'));
+    user_role_revoke_permissions(DRUPAL_ANONYMOUS_RID, ['access comments']);
+    user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, ['post comments', 'skip comment approval']);
 
     // Create a new field.
     $this->container->get('comment.manager')->addDefaultField('node', 'article');
 
     $name = strtolower($this->randomMachineName());
     $label = $this->randomMachineName();
-    $storage_edit = array('field_storage[settings][uri_scheme]' => 'private');
+    $storage_edit = ['field_storage[settings][uri_scheme]' => 'private'];
     $this->fieldUIAddNewField('admin/structure/comment/manage/comment', $name, $label, 'file', $storage_edit);
 
     // Manually clear cache on the tester side.
     \Drupal::entityManager()->clearCachedFieldDefinitions();
 
     // Create node.
-    $edit = array(
+    $edit = [
       'title[0][value]' => $this->randomMachineName(),
-    );
+    ];
     $this->drupalPostForm('node/add/article', $edit, t('Save and publish'));
     $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
 
     // Add a comment with a file.
     $text_file = $this->getTestFile('text');
-    $edit = array(
+    $edit = [
       'files[field_' . $name . '_' . 0 . ']' => drupal_realpath($text_file->getFileUri()),
       'comment_body[0][value]' => $comment_body = $this->randomMachineName(),
-    );
+    ];
     $this->drupalPostForm('node/' . $node->id(), $edit, t('Save'));
 
     // Get the comment ID.
@@ -307,8 +307,8 @@ function testPrivateFileComment() {
     $this->assertResponse(403, 'Confirmed that access is denied for the file without the needed permission.');
 
     // Unpublishes node.
-    $this->drupalLogin($this->admin_user);
-    $this->drupalPostForm('node/' . $node->id() . '/edit', array(), t('Save and unpublish'));
+    $this->drupalLogin($this->adminUser);
+    $this->drupalPostForm('node/' . $node->id() . '/edit', [], t('Save and unpublish'));
 
     // Ensures normal user can no longer download the file.
     $this->drupalLogin($user);
@@ -323,11 +323,11 @@ function testWidgetValidation() {
     $type_name = 'article';
     $field_name = strtolower($this->randomMachineName());
     $this->createFileField($field_name, 'node', $type_name);
-    $this->updateFileField($field_name, $type_name, array('file_extensions' => 'txt'));
+    $this->updateFileField($field_name, $type_name, ['file_extensions' => 'txt']);
 
-    foreach (array('nojs', 'js') as $type) {
+    foreach (['nojs', 'js'] as $type) {
       // Create node and prepare files for upload.
-      $node = $this->drupalCreateNode(array('type' => 'article'));
+      $node = $this->drupalCreateNode(['type' => 'article']);
       $nid = $node->id();
       $this->drupalGet("node/$nid/edit");
       $test_file_text = $this->getTestFile('text');
@@ -342,11 +342,11 @@ function testWidgetValidation() {
           break;
         case 'js':
           $button = $this->xpath('//input[@type="submit" and @value="' . t('Upload') . '"]');
-          $this->drupalPostAjaxForm(NULL, $edit, array((string) $button[0]['name'] => (string) $button[0]['value']));
+          $this->drupalPostAjaxForm(NULL, $edit, [(string) $button[0]['name'] => (string) $button[0]['value']]);
           break;
       }
-      $error_message = t('Only files with the following extensions are allowed: %files-allowed.', array('%files-allowed' => 'txt'));
-      $this->assertRaw($error_message, t('Validation error when file with wrong extension uploaded (JSMode=%type).', array('%type' => $type)));
+      $error_message = t('Only files with the following extensions are allowed: %files-allowed.', ['%files-allowed' => 'txt']);
+      $this->assertRaw($error_message, t('Validation error when file with wrong extension uploaded (JSMode=%type).', ['%type' => $type]));
 
       // Upload file with correct extension, check that error message is removed.
       $edit[$name] = drupal_realpath($test_file_text->getFileUri());
@@ -356,10 +356,10 @@ function testWidgetValidation() {
           break;
         case 'js':
           $button = $this->xpath('//input[@type="submit" and @value="' . t('Upload') . '"]');
-          $this->drupalPostAjaxForm(NULL, $edit, array((string) $button[0]['name'] => (string) $button[0]['value']));
+          $this->drupalPostAjaxForm(NULL, $edit, [(string) $button[0]['name'] => (string) $button[0]['value']]);
           break;
       }
-      $this->assertNoRaw($error_message, t('Validation error removed when file with correct extension uploaded (JSMode=%type).', array('%type' => $type)));
+      $this->assertNoRaw($error_message, t('Validation error removed when file with correct extension uploaded (JSMode=%type).', ['%type' => $type]));
     }
   }
 }
diff --git a/core/modules/file/src/Tests/FileListingTest.php b/core/modules/file/src/Tests/FileListingTest.php
index 25b170e..9d79a78 100644
--- a/core/modules/file/src/Tests/FileListingTest.php
+++ b/core/modules/file/src/Tests/FileListingTest.php
@@ -21,14 +21,21 @@ class FileListingTest extends FileFieldTestBase {
    *
    * @var array
    */
-  public static $modules = array('views', 'file', 'image');
+  public static $modules = ['views', 'file', 'image'];
+
+  /**
+   * An authenticated user.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $baseUser;
 
   protected function setUp() {
     parent::setUp();
 
-    $this->admin_user = $this->drupalCreateUser(array('access files overview', 'bypass node access'));
-    $this->base_user = $this->drupalCreateUser();
-    $this->createFileField('file', 'node', 'article', array(), array('file_extensions' => 'txt png'));
+    $this->adminUser = $this->drupalCreateUser(['access files overview', 'bypass node access']);
+    $this->baseUser = $this->drupalCreateUser();
+    $this->createFileField('file', 'node', 'article', [], ['file_extensions' => 'txt png']);
   }
 
   /**
@@ -58,15 +65,15 @@ protected function sumUsages($usage) {
   function testFileListingPages() {
     $file_usage = $this->container->get('file.usage');
     // Users without sufficient permissions should not see file listing.
-    $this->drupalLogin($this->base_user);
+    $this->drupalLogin($this->baseUser);
     $this->drupalGet('admin/content/files');
     $this->assertResponse(403);
 
     // Login with user with right permissions and test listing.
-    $this->drupalLogin($this->admin_user);
+    $this->drupalLogin($this->adminUser);
 
     for ($i = 0; $i < 5; $i++) {
-      $nodes[] = $this->drupalCreateNode(array('type' => 'article'));
+      $nodes[] = $this->drupalCreateNode(['type' => 'article']);
     }
 
     $this->drupalGet('admin/content/files');
diff --git a/core/modules/file/src/Tests/FilePrivateTest.php b/core/modules/file/src/Tests/FilePrivateTest.php
index a9f08a5..7c8fe9b 100644
--- a/core/modules/file/src/Tests/FilePrivateTest.php
+++ b/core/modules/file/src/Tests/FilePrivateTest.php
@@ -61,7 +61,7 @@ function testPrivateFile() {
     $no_access_field_name = 'field_no_view_access';
     $this->createFileField($no_access_field_name, 'node', $type_name, array('uri_scheme' => 'private'));
     // Test with the field that should deny access through field access.
-    $this->drupalLogin($this->admin_user);
+    $this->drupalLogin($this->adminUser);
     $nid = $this->uploadNodeFile($test_file, $no_access_field_name, $type_name, TRUE, array('private' => TRUE));
     \Drupal::entityManager()->getStorage('node')->resetCache(array($nid));
     $node = $node_storage->load($nid);
diff --git a/core/modules/file/src/Tests/FileTokenReplaceTest.php b/core/modules/file/src/Tests/FileTokenReplaceTest.php
index 84d599f..bc53e68 100644
--- a/core/modules/file/src/Tests/FileTokenReplaceTest.php
+++ b/core/modules/file/src/Tests/FileTokenReplaceTest.php
@@ -54,7 +54,7 @@ function testFileTokenReplacement() {
     $tests['[file:created:short]'] = format_date($file->getCreatedTime(), 'short', '', NULL, $language_interface->getId());
     $tests['[file:changed]'] = format_date($file->getChangedTime(), 'medium', '', NULL, $language_interface->getId());
     $tests['[file:changed:short]'] = format_date($file->getChangedTime(), 'short', '', NULL, $language_interface->getId());
-    $tests['[file:owner]'] = String::checkPlain(user_format_name($this->admin_user));
+    $tests['[file:owner]'] = String::checkPlain(user_format_name($this->adminUser));
     $tests['[file:owner:uid]'] = $file->getOwnerId();
 
     // Test to make sure that we generated something for each token.
diff --git a/core/modules/file/src/Tests/SaveUploadTest.php b/core/modules/file/src/Tests/SaveUploadTest.php
index 3b34f91..8637e78 100644
--- a/core/modules/file/src/Tests/SaveUploadTest.php
+++ b/core/modules/file/src/Tests/SaveUploadTest.php
@@ -15,6 +15,8 @@
 class SaveUploadTest extends FileManagedTestBase {
   /**
    * An image file path for uploading.
+   *
+   * @var \Drupal\file\FileInterface
    */
   protected $image;
 
@@ -28,6 +30,13 @@ class SaveUploadTest extends FileManagedTestBase {
    */
   protected $maxFidBefore;
 
+  /**
+   * Extension of the image filename.
+   *
+   * @var string
+   */
+  protected $imageExtension;
+
   protected function setUp() {
     parent::setUp();
     $account = $this->drupalCreateUser();
@@ -36,7 +45,7 @@ protected function setUp() {
     $image_files = $this->drupalGetTestFiles('image');
     $this->image = entity_create('file', (array) current($image_files));
 
-    list(, $this->image_extension) = explode('.', $this->image->getFilename());
+    list(, $this->imageExtension) = explode('.', $this->image->getFilename());
     $this->assertTrue(is_file($this->image->getFileUri()), "The image file we're going to upload exists.");
 
     $this->phpfile = current($this->drupalGetTestFiles('php'));
@@ -135,7 +144,7 @@ function testHandleExtension() {
     // Reset the hook counters.
     file_test_reset();
 
-    $extensions = 'foo ' . $this->image_extension;
+    $extensions = 'foo ' . $this->imageExtension;
     // Now tell file_save_upload() to allow the extension of our test image.
     $edit = array(
       'file_test_replace' => FILE_EXISTS_REPLACE,
@@ -218,12 +227,12 @@ function testHandleDangerousFile() {
   function testHandleFileMunge() {
     // Ensure insecure uploads are disabled for this test.
     $this->config('system.file')->set('allow_insecure_uploads', 0)->save();
-    $this->image = file_move($this->image, $this->image->getFileUri() . '.foo.' . $this->image_extension);
+    $this->image = file_move($this->image, $this->image->getFileUri() . '.foo.' . $this->imageExtension);
 
     // Reset the hook counters to get rid of the 'move' we just called.
     file_test_reset();
 
-    $extensions = $this->image_extension;
+    $extensions = $this->imageExtension;
     $edit = array(
       'files[file_test_upload]' => drupal_realpath($this->image->getFileUri()),
       'extensions' => $extensions,
@@ -231,7 +240,7 @@ function testHandleFileMunge() {
 
     $munged_filename = $this->image->getFilename();
     $munged_filename = substr($munged_filename, 0, strrpos($munged_filename, '.'));
-    $munged_filename .= '_.' . $this->image_extension;
+    $munged_filename .= '_.' . $this->imageExtension;
 
     $this->drupalPostForm('file-test/upload', $edit, t('Submit'));
     $this->assertResponse(200, 'Received a 200 response for posted test file.');
diff --git a/core/modules/file/src/Tests/ValidatorTest.php b/core/modules/file/src/Tests/ValidatorTest.php
index 304a84c..a17fa8f 100644
--- a/core/modules/file/src/Tests/ValidatorTest.php
+++ b/core/modules/file/src/Tests/ValidatorTest.php
@@ -15,14 +15,18 @@
 class ValidatorTest extends FileManagedUnitTestBase {
 
   /**
-   * @var \Drupal\file\Entity\File
+   * An image file.
+   *
+   * @var \Drupal\file\FileInterface
    */
   protected $image;
 
   /**
+   * A file which is not an image.
+   *
    * @var \Drupal\file\Entity\File
    */
-  protected $non_image;
+  protected $nonImage;
 
   protected function setUp() {
     parent::setUp();
@@ -31,9 +35,9 @@ protected function setUp() {
     $this->image->setFileUri('core/misc/druplicon.png');
     $this->image->setFilename(drupal_basename($this->image->getFileUri()));
 
-    $this->non_image = entity_create('file');
-    $this->non_image->setFileUri('core/assets/vendor/jquery/jquery.min.js');
-    $this->non_image->setFilename(drupal_basename($this->non_image->getFileUri()));
+    $this->nonImage = entity_create('file');
+    $this->nonImage->setFileUri('core/assets/vendor/jquery/jquery.min.js');
+    $this->nonImage->setFilename(drupal_basename($this->nonImage->getFileUri()));
   }
 
   /**
@@ -57,8 +61,8 @@ function testFileValidateIsImage() {
     $errors = file_validate_is_image($this->image);
     $this->assertEqual(count($errors), 0, 'No error reported for our image file.', 'File');
 
-    $this->assertTrue(file_exists($this->non_image->getFileUri()), 'The non-image being tested exists.', 'File');
-    $errors = file_validate_is_image($this->non_image);
+    $this->assertTrue(file_exists($this->nonImage->getFileUri()), 'The non-image being tested exists.', 'File');
+    $errors = file_validate_is_image($this->nonImage);
     $this->assertEqual(count($errors), 1, 'An error reported for our non-image file.', 'File');
   }
 
@@ -68,9 +72,9 @@ function testFileValidateIsImage() {
    */
   function testFileValidateImageResolution() {
     // Non-images.
-    $errors = file_validate_image_resolution($this->non_image);
+    $errors = file_validate_image_resolution($this->nonImage);
     $this->assertEqual(count($errors), 0, 'Should not get any errors for a non-image file.', 'File');
-    $errors = file_validate_image_resolution($this->non_image, '50x50', '100x100');
+    $errors = file_validate_image_resolution($this->nonImage, '50x50', '100x100');
     $this->assertEqual(count($errors), 0, 'Do not check the resolution on non files.', 'File');
 
     // Minimum size.
