diff --git a/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php b/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php index f7dbdb6..00541af 100644 --- a/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php +++ b/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php @@ -203,13 +203,13 @@ protected function assertHeader($header, $value, $message = '', $group = 'Browse /** * Overrides WebTestBase::drupalLogin(). */ - protected function drupalLogin($user) { + protected function drupalLogin($user, $by_email) { if (isset($this->curlHandle)) { // cURL quirk: when setting CURLOPT_CUSTOMREQUEST to anything other than // POST in httpRequest() it has to be restored to POST here. Otherwise the // POST request to login a user will not work. curl_setopt($this->curlHandle, CURLOPT_CUSTOMREQUEST, 'POST'); } - parent::drupalLogin($user); + parent::drupalLogin($user, $by_email); } } diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index a1a1404..ce65613 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -632,7 +632,7 @@ protected function drupalLogin($account, $by_email = FALSE) { } $edit = array( - 'name' => $by_email ? $user->mail : $user->name, + 'name' => $by_email ? $account->mail : $account->name, 'pass' => $account->pass_raw ); $this->drupalPost('user', $edit, t('Log in')); diff --git a/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php b/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php index 5831a30..eba1df4 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserLoginTest.php @@ -22,7 +22,6 @@ public static function getInfo() { ); } - /** * Test that login credentials work with each method. */