コード例 #1
0
ファイル: _bootstrap.php プロジェクト: bafs/parvula
 public function boot(APITester $I)
 {
     $I->amHttpAuthenticated('admin', 'testpassword');
     $I->sendGET('/login');
     $I->seeResponseCodeIs(201);
     $json = $I->grabResponse();
     $this->token = json_decode($json)->token;
 }
コード例 #2
0
ファイル: AuthCest.php プロジェクト: bafs/parvula
 public function checkLogin(APITester $I)
 {
     $I->amHttpAuthenticated('admin', 'testpassword');
     $I->sendGET('/login');
     $I->seeResponseCodeIs(201);
     $I->seeResponseIsJson();
     $I->seeResponseContainsJson(['status' => 'ok']);
 }