Commit 41e7a896 authored by andypost's avatar andypost Committed by andypost

Issue #3038196 by jyoti.ohol, andypost: Replace deprecated method...

Issue #3038196 by jyoti.ohol, andypost: Replace deprecated method getUsername() with getDisplayName()
parent e682b788
......@@ -63,7 +63,7 @@ class ContactStoragePersonalTest extends BrowserTestBase {
*/
public function testSendPersonalContactMessage() {
// Ensure that the web user's email needs escaping.
$mail = $this->webUser->getUsername() . '&escaped@example.com';
$mail = $this->webUser->getAccountName() . '&escaped@example.com';
$this->webUser->setEmail($mail)->save();
$this->drupalLogin($this->webUser);
......@@ -96,7 +96,7 @@ class ContactStoragePersonalTest extends BrowserTestBase {
$placeholders = [
'@sender_name' => $this->webUser->username,
'@sender_email' => $this->webUser->getEmail(),
'@recipient_name' => $this->contactUser->getUsername()
'@recipient_name' => $this->contactUser->getDisplayName(),
];
$this->assertRaw(SafeMarkup::format('@sender_name (@sender_email) sent @recipient_name an email.', $placeholders));
// Ensure an unescaped version of the email does not exist anywhere.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment