diff --git a/core/modules/user/src/Tests/UserUsernameTest.php b/core/modules/user/src/Tests/UserUsernameTest.php index b6ee9b2..1284219 100644 --- a/core/modules/user/src/Tests/UserUsernameTest.php +++ b/core/modules/user/src/Tests/UserUsernameTest.php @@ -100,7 +100,7 @@ public function testTruncatedNodeAuthorName() { // Tests if the username is trimmed to USERNAME_TRIM_LENGTH value. // @see template_preprocess_username() - $this->assertText(Html::escape($this->userLongName->getUsername())); + $this->assertNoText(Html::escape($this->userLongName->getUsername())); $this->assertText(Html::escape(Unicode::truncate($this->userLongName->getUsername(), USERNAME_TRIM_LENGTH - 1, FALSE, TRUE))); } @@ -116,7 +116,7 @@ public function testTruncatedCommentAuthorName() { 'comment_body[0][value]' => $this->randomMachineName(20), ]; $this->drupalPostForm('comment/reply/node/' . $node->id() . '/comment', $comment, t('Save')); - $this->assertText(Html::escape($this->userLongName->getUsername())); + $this->assertText(Html::escape($this->userShortName->getUsername())); $this->drupalLogin($this->userLongName); $comment = [ 'subject[0][value]' => $this->randomMachineName(),