diff --git a/core/modules/link/src/Tests/LinkFieldTest.php b/core/modules/link/src/Tests/LinkFieldTest.php
index 97058f0..945a1cd 100644
--- a/core/modules/link/src/Tests/LinkFieldTest.php
+++ b/core/modules/link/src/Tests/LinkFieldTest.php
@@ -25,7 +25,7 @@ class LinkFieldTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('entity_test', 'link');
+  public static $modules = ['entity_test', 'link'];
 
   /**
    * A field to use in this test class.
@@ -41,22 +41,14 @@ class LinkFieldTest extends WebTestBase {
    */
   protected $field;
 
-  /**
-   * A user with permission to view and manage test entities.
-   *
-   * @var object
-   */
-  protected $web_user;
-
   protected function setUp() {
     parent::setUp();
 
-    $this->web_user = $this->drupalCreateUser(array(
+    $this->drupalLogin($this->drupalCreateUser([
       'view test entity',
       'administer entity_test content',
       'link to any page',
-    ));
-    $this->drupalLogin($this->web_user);
+    ]));
   }
 
   /**
diff --git a/core/modules/link/src/Tests/LinkFieldUITest.php b/core/modules/link/src/Tests/LinkFieldUITest.php
index 1f7c3c1..fd56518 100644
--- a/core/modules/link/src/Tests/LinkFieldUITest.php
+++ b/core/modules/link/src/Tests/LinkFieldUITest.php
@@ -25,13 +25,12 @@ class LinkFieldUITest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('node', 'link', 'field_ui');
+  public static $modules = ['node', 'link', 'field_ui'];
 
   protected function setUp() {
     parent::setUp();
 
-    $this->web_user = $this->drupalCreateUser(array('administer content types', 'administer node fields', 'administer node display'));
-    $this->drupalLogin($this->web_user);
+    $this->drupalLogin($this->drupalCreateUser(['administer content types', 'administer node fields', 'administer node display']));
   }
 
   /**
