diff --git a/core/modules/user/src/Tests/UserUsernameTest.php b/core/modules/user/src/Tests/UserUsernameTest.php index d63e51f..d349d84 100644 --- a/core/modules/user/src/Tests/UserUsernameTest.php +++ b/core/modules/user/src/Tests/UserUsernameTest.php @@ -130,9 +130,7 @@ public function testTruncatedCommentAuthorName() { */ public function testTruncatedWhosNewName() { // Enable Who's New block. - $this->drupalPlaceBlock('views_block:who_s_new-block_1'); - - $this->drupalGet(''); + $this->drupalPlaceBlock('views_block:who_s_new-block_1', array('cache' => array('max_age' => 0))); // The Who's new block requires a last access to be set. // Log the users in for them to show up. @@ -142,6 +140,7 @@ public function testTruncatedWhosNewName() { // Log user out to prevent a false negative. $this->drupalLogout(); + $this->drupalGet(''); $this->assertText(SafeMarkup::checkPlain($this->userShortName->getUsername()), 'Untruncated username found.'); $this->assertNoText(SafeMarkup::checkPlain($this->userLongName->getUsername()), 'Untruncated username not found.'); $this->assertText(SafeMarkup::checkPlain(Unicode::truncate($this->userLongName->getUsername(), 29, FALSE, TRUE)), 'Truncated username found.');