diff core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 129ea1e6d783
children
line wrap: on
line diff
--- a/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php	Thu Feb 28 13:21:36 2019 +0000
+++ b/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php	Thu May 09 15:33:08 2019 +0100
@@ -109,10 +109,10 @@
     $output = entity_view($entity, 'block');
     $this->setRawContent($this->renderer->renderRoot($output));
     $this->assertRaw('2 users', 'Correct number of online users (2 users).');
-    $this->assertText($user1->getUsername(), 'Active user 1 found in online list.');
-    $this->assertText($user2->getUsername(), 'Active user 2 found in online list.');
-    $this->assertNoText($user3->getUsername(), 'Inactive user not found in online list.');
-    $this->assertTrue(strpos($this->getRawContent(), $user1->getUsername()) > strpos($this->getRawContent(), $user2->getUsername()), 'Online users are ordered correctly.');
+    $this->assertText($user1->getAccountName(), 'Active user 1 found in online list.');
+    $this->assertText($user2->getAccountName(), 'Active user 2 found in online list.');
+    $this->assertNoText($user3->getAccountName(), 'Inactive user not found in online list.');
+    $this->assertTrue(strpos($this->getRawContent(), $user1->getAccountName()) > strpos($this->getRawContent(), $user2->getAccountName()), 'Online users are ordered correctly.');
   }
 
 }