/** * Logs in with Behad credentials to enable Behat fixture use * * @return void */ function logInWithBehatCredentials() { $creds = getBehatCredentials(); $options = ['logger' => getLogger()]; $auth = new AuthHelper($options); $auth->logInViaUsernameAndPassword($creds['username'], $creds['password']); }
/** * Logs in with Behad credentials to enable Behat fixture use * * @return void */ function logInWithBehatCredentials() { $creds = getBehatCredentials(); $command = new ArtCommand(['runner' => new Runner()]); $auth = new AuthHelper(compact('command')); $auth->logInViaUsernameAndPassword($creds['username'], $creds['password']); }
public function testTokenExistsForEmail() { $tokens_cache = new TokensCache(); $tokens_dir = $tokens_cache->getCacheDir(); $creds = getBehatCredentials(); $file_name = $tokens_dir . '/' . $creds['username']; setOutputDestination($file_name); $this->assertTrue($this->auth->tokenExistsForEmail($creds['username'])); resetOutputDestination($file_name); $this->assertFalse($this->auth->tokenExistsForEmail('invalid')); }
/** * Logs in with Behad credentials to enable Behat fixture use * * @return void */ function logInWithBehatCredentials() { $creds = getBehatCredentials(); $auth = new Auth(); $auth->logInViaUsernameAndPassword($creds['username'], $creds['password']); }