Commit 4c3cdc89 authored by jalpesh's avatar jalpesh Committed by elachlan

Issue #2888429 by jalpesh: Replace deprecated method getUsername() with getDisplayName()

parent 109ff6d2
...@@ -135,7 +135,7 @@ class CaptchaSessionReuseAttackTestCase extends CaptchaBaseWebTestCase { ...@@ -135,7 +135,7 @@ class CaptchaSessionReuseAttackTestCase extends CaptchaBaseWebTestCase {
// Log in through form. // Log in through form.
$edit = [ $edit = [
'name' => $this->normalUser->getUsername(), 'name' => $this->normalUser->getDisplayName(),
'pass' => $this->normalUser->pass_raw, 'pass' => $this->normalUser->pass_raw,
'captcha_response' => $solution, 'captcha_response' => $solution,
]; ];
...@@ -144,7 +144,7 @@ class CaptchaSessionReuseAttackTestCase extends CaptchaBaseWebTestCase { ...@@ -144,7 +144,7 @@ class CaptchaSessionReuseAttackTestCase extends CaptchaBaseWebTestCase {
$this->assertCaptchaPresence(FALSE); $this->assertCaptchaPresence(FALSE);
// If a "log out" link appears on the page, it is almost certainly because // If a "log out" link appears on the page, it is almost certainly because
// the login was successful. // the login was successful.
$this->assertText($this->normalUser->getUsername()); $this->assertText($this->normalUser->getDisplayName());
// Log out again. // Log out again.
$this->drupalLogout(); $this->drupalLogout();
......
...@@ -45,7 +45,7 @@ class CaptchaTestCase extends CaptchaBaseWebTestCase { ...@@ -45,7 +45,7 @@ class CaptchaTestCase extends CaptchaBaseWebTestCase {
// Try to log in, which should fail. // Try to log in, which should fail.
$edit = [ $edit = [
'name' => $user->getUsername(), 'name' => $user->getDisplayName(),
'pass' => $user->pass_raw, 'pass' => $user->pass_raw,
'captcha_response' => '?', 'captcha_response' => '?',
]; ];
......
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