Beispiel #1
0
 public function boot(APITester $I)
 {
     $I->amHttpAuthenticated('admin', 'testpassword');
     $I->sendGET('/login');
     $I->seeResponseCodeIs(201);
     $json = $I->grabResponse();
     $this->token = json_decode($json)->token;
 }
Beispiel #2
0
 public function checkLogin(APITester $I)
 {
     $I->amHttpAuthenticated('admin', 'testpassword');
     $I->sendGET('/login');
     $I->seeResponseCodeIs(201);
     $I->seeResponseIsJson();
     $I->seeResponseContainsJson(['status' => 'ok']);
 }