Exemple #1
1
/**
 * 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']);
}
Exemple #2
0
/**
 * 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']);
}
Exemple #3
0
 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'));
 }
Exemple #4
0
/**
 * 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']);
}