login('Admin', 'password_0'); } elseif ($login !== null && $password !== null) { $route->login($login, $password); } else { throw new InvalidArgumentException('login and password should be presented both.'); } $this->canSeeResponseIsJson(); $this->canSeeResponseJsonMatchesJsonPath('$.jwt'); $jwt = $this->grabDataFromResponseByJsonPath('$.jwt')[0]; $this->amBearerAuthenticated($jwt); } public function notLoggedIn() { $this->haveHttpHeader('Authorization', null); } }