Created
November 30, 2014 10:34
-
-
Save nedSaf/54f6756fdfbc8f232560 to your computer and use it in GitHub Desktop.
Login custom function for behat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Authenticates a user with password from configuration. | |
* | |
* @Given /^I am logged in as user "([^"]*)"$/ | |
*/ | |
public function iAmLoggedInAsUser($username) { | |
$this->user = new stdClass(); | |
$this->user->name = $username; | |
$this->user->pass = $this->drupal_users[$username]; | |
$this->login(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment