PersonCept

This commit is contained in:
Paminger
2016-04-26 15:23:21 +02:00
parent fe227ebdcb
commit 39f65875c6
4 changed files with 142 additions and 122 deletions
+13 -3
View File
@@ -1,17 +1,27 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('test the Person code');
$I->wantTo('test the Person id');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/person/Person/person?code=4ffd30cc58718');
$I->sendGET('v1/person/Person/person?person_id=3');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'person_id' => '3',
'nachname' => 'McKenzie']);
$I->sendGET('v1/person/person/Person', array('code' => 'bd94ef5d5a'));
$I->wantTo('test the Person code');
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/person/Person/person?code=bd94ef5d5a');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'person_id' => '4',
'nachname' => 'Wilderman']);
$I->wantTo('test the Person not found');
$I->sendGET('v1/person/person/Person', array('code' => '12345'));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([