Commit 94739f0a authored by David_Rothstein's avatar David_Rothstein

Issue #1898314 by droplet | xjm: Rename $user to $account in WebTestBase::drupalLogin().

parent ba9b60db
......@@ -1217,28 +1217,28 @@ protected function checkPermissions(array $permissions, $reset = FALSE) {
* $account->pass_raw = $pass_raw;
* @endcode
*
* @param $user
* @param $account
* User object representing the user to log in.
*
* @see drupalCreateUser()
*/
protected function drupalLogin(stdClass $user) {
protected function drupalLogin(stdClass $account) {
if ($this->loggedInUser) {
$this->drupalLogout();
}
$edit = array(
'name' => $user->name,
'pass' => $user->pass_raw
'name' => $account->name,
'pass' => $account->pass_raw
);
$this->drupalPost('user', $edit, t('Log in'));
// If a "log out" link appears on the page, it is almost certainly because
// the login was successful.
$pass = $this->assertLink(t('Log out'), 0, t('User %name successfully logged in.', array('%name' => $user->name)), t('User login'));
$pass = $this->assertLink(t('Log out'), 0, t('User %name successfully logged in.', array('%name' => $account->name)), t('User login'));
if ($pass) {
$this->loggedInUser = $user;
$this->loggedInUser = $account;
}
}
......
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