diff --git a/core/modules/user/src/Tests/UserAutocompleteTest.php b/core/modules/user/src/Tests/UserAutocompleteTest.php
index a56c33c..539f558 100644
--- a/core/modules/user/src/Tests/UserAutocompleteTest.php
+++ b/core/modules/user/src/Tests/UserAutocompleteTest.php
@@ -17,12 +17,27 @@
  * @group user
  */
 class UserAutocompleteTest extends WebTestBase {
+
+  /**
+   * A regular user for testing.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $unprivilegedUser;
+
+  /**
+   * An user with permissions to access user profiles.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $privilegedUser;
+
   protected function setUp() {
     parent::setUp();
 
     // Set up two users with different permissions to test access.
-    $this->unprivileged_user = $this->drupalCreateUser();
-    $this->privileged_user = $this->drupalCreateUser(array('access user profiles'));
+    $this->unprivilegedUser = $this->drupalCreateUser();
+    $this->privilegedUser = $this->drupalCreateUser(array('access user profiles'));
   }
 
   /**
@@ -30,19 +45,19 @@ protected function setUp() {
    */
   function testUserAutocomplete() {
     // Check access from unprivileged user, should be denied.
-    $this->drupalLogin($this->unprivileged_user);
-    $username = $this->unprivileged_user->getUsername();
+    $this->drupalLogin($this->unprivilegedUser);
+    $username = $this->unprivilegedUser->getUsername();
     $this->drupalGet('user/autocomplete', array('query' => array('q' => $username[0])));
     $this->assertResponse(403, 'Autocompletion access denied to user without permission.');
 
     // Check access from privileged user.
     $this->drupalLogout();
-    $this->drupalLogin($this->privileged_user);
+    $this->drupalLogin($this->privilegedUser);
     $this->drupalGet('user/autocomplete', array('query' => array('q' => $username[0])));
     $this->assertResponse(200, 'Autocompletion access allowed.');
 
     // Using first letter of the user's name, make sure the user's full name is in the results.
-    $this->assertRaw($this->unprivileged_user->getUsername(), 'User name found in autocompletion results.');
+    $this->assertRaw($this->unprivilegedUser->getUsername(), 'User name found in autocompletion results.');
 
     $anonymous_name = $this->randomString() . '<script>alert();</script>';
     \Drupal::config('user.settings')->set('anonymous', $anonymous_name)->save();
diff --git a/core/modules/user/src/Tests/UserCancelTest.php b/core/modules/user/src/Tests/UserCancelTest.php
index 9841ebe..f134745 100644
--- a/core/modules/user/src/Tests/UserCancelTest.php
+++ b/core/modules/user/src/Tests/UserCancelTest.php
@@ -25,6 +25,13 @@ class UserCancelTest extends WebTestBase {
    */
   public static $modules = array('node', 'comment');
 
+  /**
+   * User with admin privileges.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
   protected function setUp() {
     parent::setUp();
 
@@ -90,8 +97,8 @@ function testUserCancelUid1() {
     $user1->pass_raw = $password;
 
     // Try to cancel uid 1's account with a different user.
-    $this->admin_user = $this->drupalCreateUser(array('administer users'));
-    $this->drupalLogin($this->admin_user);
+    $this->adminUser = $this->drupalCreateUser(array('administer users'));
+    $this->drupalLogin($this->adminUser);
     $edit = array(
       'action' => 'user_cancel_user_action',
       'user_bulk_form[0]' => TRUE,
diff --git a/core/modules/user/src/Tests/UserPermissionsTest.php b/core/modules/user/src/Tests/UserPermissionsTest.php
index ed937dc..7a8bb2e 100644
--- a/core/modules/user/src/Tests/UserPermissionsTest.php
+++ b/core/modules/user/src/Tests/UserPermissionsTest.php
@@ -17,16 +17,28 @@
  * @group user
  */
 class UserPermissionsTest extends WebTestBase {
-  protected $admin_user;
+
+  /**
+   * User with admin privileges.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
+  /**
+   * User's role ID.
+   *
+   * @var string
+   */
   protected $rid;
 
   protected function setUp() {
     parent::setUp();
 
-    $this->admin_user = $this->drupalCreateUser(array('administer permissions', 'access user profiles', 'administer site configuration', 'administer modules', 'administer account settings'));
+    $this->adminUser = $this->drupalCreateUser(array('administer permissions', 'access user profiles', 'administer site configuration', 'administer modules', 'administer account settings'));
 
     // Find the new role ID.
-    $all_rids = $this->admin_user->getRoles();
+    $all_rids = $this->adminUser->getRoles();
     unset($all_rids[array_search(DRUPAL_AUTHENTICATED_RID, $all_rids)]);
     $this->rid = reset($all_rids);
   }
@@ -37,9 +49,9 @@ protected function setUp() {
   function testUserPermissionChanges() {
     $permissions_hash_generator = $this->container->get('user.permissions_hash');
 
-    $this->drupalLogin($this->admin_user);
+    $this->drupalLogin($this->adminUser);
     $rid = $this->rid;
-    $account = $this->admin_user;
+    $account = $this->adminUser;
     $previous_permissions_hash = $permissions_hash_generator->generate($account);
     $this->assertIdentical($previous_permissions_hash, $permissions_hash_generator->generate($this->loggedInUser));
 
@@ -74,7 +86,7 @@ function testUserPermissionChanges() {
    * Test assigning of permissions for the administrator role.
    */
   function testAdministratorRole() {
-    $this->drupalLogin($this->admin_user);
+    $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/config/people/accounts');
 
     // Verify that the administration role is none by default.
@@ -89,7 +101,7 @@ function testAdministratorRole() {
     // permission is assigned by default.
     \Drupal::service('module_installer')->install(array('aggregator'));
 
-    $this->assertTrue($this->admin_user->hasPermission('administer news feeds'), 'The permission was automatically assigned to the administrator role');
+    $this->assertTrue($this->adminUser->hasPermission('administer news feeds'), 'The permission was automatically assigned to the administrator role');
   }
 
   /**
@@ -99,7 +111,7 @@ function testUserRoleChangePermissions() {
     $permissions_hash_generator = $this->container->get('user.permissions_hash');
 
     $rid = $this->rid;
-    $account = $this->admin_user;
+    $account = $this->adminUser;
     $previous_permissions_hash = $permissions_hash_generator->generate($account);
 
     // Verify current permissions.
diff --git a/core/modules/user/src/Tests/UserPictureTest.php b/core/modules/user/src/Tests/UserPictureTest.php
index 639c382..60d99b3f 100644
--- a/core/modules/user/src/Tests/UserPictureTest.php
+++ b/core/modules/user/src/Tests/UserPictureTest.php
@@ -27,13 +27,17 @@ class UserPictureTest extends WebTestBase {
    */
   protected $profile = 'standard';
 
-  protected $user;
-  protected $_directory_test;
+  /**
+   * A regular user.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $webUser;
 
   protected function setUp() {
     parent::setUp();
 
-    $this->web_user = $this->drupalCreateUser(array(
+    $this->webUser = $this->drupalCreateUser(array(
       'access content',
       'access comments',
       'post comments',
@@ -45,7 +49,7 @@ protected function setUp() {
    * Tests creation, display, and deletion of user pictures.
    */
   function testCreateDeletePicture() {
-    $this->drupalLogin($this->web_user);
+    $this->drupalLogin($this->webUser);
 
     // Save a new picture.
     $image = current($this->drupalGetTestFiles('image'));
@@ -57,7 +61,7 @@ function testCreateDeletePicture() {
 
     // Delete the picture.
     $edit = array();
-    $this->drupalPostForm('user/' . $this->web_user->id() . '/edit', $edit, t('Remove'));
+    $this->drupalPostForm('user/' . $this->webUser->id() . '/edit', $edit, t('Remove'));
     $this->drupalPostForm(NULL, array(), t('Save'));
 
     // Call file_cron() to clean up the file. Make sure the timestamp
@@ -82,7 +86,7 @@ function testCreateDeletePicture() {
    * Tests embedded users on node pages.
    */
   function testPictureOnNodeComment() {
-    $this->drupalLogin($this->web_user);
+    $this->drupalLogin($this->webUser);
 
     // Save a new picture.
     $image = current($this->drupalGetTestFiles('image'));
@@ -130,10 +134,10 @@ function testPictureOnNodeComment() {
    */
   function saveUserPicture($image) {
     $edit = array('files[user_picture_0]' => drupal_realpath($image->uri));
-    $this->drupalPostForm('user/' . $this->web_user->id() . '/edit', $edit, t('Save'));
+    $this->drupalPostForm('user/' . $this->webUser->id() . '/edit', $edit, t('Save'));
 
     // Load actual user data from database.
-    $account = user_load($this->web_user->id(), TRUE);
+    $account = user_load($this->webUser->id(), TRUE);
     return file_load($account->user_picture->target_id, TRUE);
   }
 }
diff --git a/core/modules/user/src/Tests/UserRoleAdminTest.php b/core/modules/user/src/Tests/UserRoleAdminTest.php
index 427ad8f..f410d36 100644
--- a/core/modules/user/src/Tests/UserRoleAdminTest.php
+++ b/core/modules/user/src/Tests/UserRoleAdminTest.php
@@ -17,16 +17,23 @@
  */
 class UserRoleAdminTest extends WebTestBase {
 
+  /**
+   * User with admin privileges.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
   protected function setUp() {
     parent::setUp();
-    $this->admin_user = $this->drupalCreateUser(array('administer permissions', 'administer users'));
+    $this->adminUser = $this->drupalCreateUser(array('administer permissions', 'administer users'));
   }
 
   /**
    * Test adding, renaming and deleting roles.
    */
   function testRoleAdministration() {
-    $this->drupalLogin($this->admin_user);
+    $this->drupalLogin($this->adminUser);
     $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
     // Test presence of tab.
     $this->drupalGet('admin/people/permissions');
@@ -85,7 +92,7 @@ function testRoleAdministration() {
    * Test user role weight change operation and ordering.
    */
   function testRoleWeightOrdering() {
-    $this->drupalLogin($this->admin_user);
+    $this->drupalLogin($this->adminUser);
     $roles = user_roles();
     $weight = count($roles);
     $new_role_weights = array();
diff --git a/core/modules/user/src/Tests/UserRolesAssignmentTest.php b/core/modules/user/src/Tests/UserRolesAssignmentTest.php
index 124a263..8340ebf 100644
--- a/core/modules/user/src/Tests/UserRolesAssignmentTest.php
+++ b/core/modules/user/src/Tests/UserRolesAssignmentTest.php
@@ -15,12 +15,18 @@
  * @group user
  */
 class UserRolesAssignmentTest extends WebTestBase {
-  protected $admin_user;
+
+  /**
+   * User with admin privileges.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
 
   protected function setUp() {
     parent::setUp();
-    $this->admin_user = $this->drupalCreateUser(array('administer permissions', 'administer users'));
-    $this->drupalLogin($this->admin_user);
+    $this->adminUser = $this->drupalCreateUser(array('administer permissions', 'administer users'));
+    $this->drupalLogin($this->adminUser);
   }
 
   /**
diff --git a/core/modules/user/src/Tests/UserSignatureTest.php b/core/modules/user/src/Tests/UserSignatureTest.php
index 71f3148..f6e52cf 100644
--- a/core/modules/user/src/Tests/UserSignatureTest.php
+++ b/core/modules/user/src/Tests/UserSignatureTest.php
@@ -17,6 +17,34 @@
 class UserSignatureTest extends WebTestBase {
 
   /**
+   * A regular user.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $webUser;
+
+  /**
+   * User with admin privileges.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
+  /**
+   * Filtered HTML format.
+   *
+   * @var \Drupal\filter\FilterFormatInterface;
+   */
+  protected $filteredHtmlFormat;
+
+  /**
+   * Full HTML format.
+   *
+   * @var \Drupal\filter\FilterFormatInterface;
+   */
+  protected $fullHtmlFormat;
+
+  /**
    * Modules to enable.
    *
    * @var array
@@ -35,7 +63,7 @@ protected function setUp() {
     $this->container->get('comment.manager')->addDefaultField('node', 'page');
 
     // Prefetch and create text formats.
-    $this->filtered_html_format = entity_create('filter_format', array(
+    $this->filteredHtmlFormat = entity_create('filter_format', array(
       'format' => 'filtered_html_format',
       'name' => 'Filtered HTML',
       'weight' => -1,
@@ -49,18 +77,18 @@ protected function setUp() {
         ),
       ),
     ));
-    $this->filtered_html_format->save();
+    $this->filteredHtmlFormat->save();
 
-    $this->full_html_format = entity_create('filter_format', array(
+    $this->fullHtmlFormat = entity_create('filter_format', array(
       'format' => 'full_html',
       'name' => 'Full HTML',
     ));
-    $this->full_html_format->save();
+    $this->fullHtmlFormat->save();
 
-    user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array($this->filtered_html_format->getPermissionName()));
+    user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array($this->filteredHtmlFormat->getPermissionName()));
 
     // Create regular and administrative users.
-    $this->web_user = $this->drupalCreateUser(array('post comments'));
+    $this->webUser = $this->drupalCreateUser(array('post comments'));
 
     $admin_permissions = array('post comments', 'administer comments', 'administer user form display', 'administer account settings');
     foreach (filter_formats() as $format) {
@@ -68,7 +96,7 @@ protected function setUp() {
         $admin_permissions[] = $permission;
       }
     }
-    $this->admin_user = $this->drupalCreateUser($admin_permissions);
+    $this->adminUser = $this->drupalCreateUser($admin_permissions);
   }
 
   /**
@@ -90,12 +118,12 @@ function testUserSignature() {
     $this->assertNoText(t('Signature'));
 
     // Log in as a regular user and create a signature.
-    $this->drupalLogin($this->web_user);
+    $this->drupalLogin($this->webUser);
     $signature_text = "<h1>" . $this->randomMachineName() . "</h1>";
     $edit = array(
       'signature[value]' => $signature_text,
     );
-    $this->drupalPostForm('user/' . $this->web_user->id() . '/edit', $edit, t('Save'));
+    $this->drupalPostForm('user/' . $this->webUser->id() . '/edit', $edit, t('Save'));
 
     // Verify that values were stored.
     $this->assertFieldByName('signature[value]', $edit['signature[value]'], 'Submitted signature text found.');
@@ -118,14 +146,14 @@ function testUserSignature() {
 
     // Log in as an administrator and edit the comment to use Full HTML, so
     // that the comment text itself is not filtered at all.
-    $this->drupalLogin($this->admin_user);
-    $edit['comment_body[0][format]'] = $this->full_html_format->id();
+    $this->drupalLogin($this->adminUser);
+    $edit['comment_body[0][format]'] = $this->fullHtmlFormat->id();
     $this->drupalPostForm('comment/' . $comment_id . '/edit', $edit, t('Save'));
 
     // Assert that the signature did not make it through unfiltered.
     $this->drupalGet('node/' . $node->id());
     $this->assertNoRaw($signature_text, 'Unfiltered signature text not found.');
-    $this->assertRaw(check_markup($signature_text, $this->filtered_html_format->id()), 'Filtered signature text found.');
+    $this->assertRaw(check_markup($signature_text, $this->filteredHtmlFormat->id()), 'Filtered signature text found.');
     // Verify that the user signature's text format's cache tag is present.
     $this->drupalGet('node/' . $node->id());
     $this->assertTrue(in_array('filter_format:filtered_html_format', explode(' ', $this->drupalGetHeader('X-Drupal-Cache-Tags'))));
