Ejemplo n.º 1
0
 /**
  * @author LAHAXE Arnaud
  *
  * @param string $login
  * @param string $password
  * @param int    $status
  *
  */
 public function login($login = '******', $password = '******', $status = 200)
 {
     $this->logout();
     parent::call('POST', '/api/v1/oauth/access_token', ['username' => $login, 'password' => $password, 'grant_type' => 'password', 'client_id' => 'versusmind', 'client_secret' => 'versusmind']);
     $this->seeJson([]);
     $this->seeStatusCode($status);
     if ($this->response->getStatusCode() == 200) {
         self::$oAuthCredentials = json_decode($this->response->getContent());
     }
 }