mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-15 16:29:36 +00:00
26 lines
850 B
PHP
26 lines
850 B
PHP
<?php
|
|
|
|
$I = new ApiTester($scenario);
|
|
$I->wantTo('Test API call v1/person/person/Person');
|
|
$I->amHttpAuthenticated("admin", "1q2w3");
|
|
$I->haveHttpHeader('FHC-API-KEY', '[email protected]');
|
|
$I->sendGET('v1/person/person/Person', array('person_id' => 3));
|
|
$I->seeResponseCodeIs(200);
|
|
$I->seeResponseIsJson();
|
|
$I->seeResponseContainsJson([
|
|
'success' => TRUE,
|
|
'message' => 'Person found']);
|
|
|
|
$I->sendGET('v1/person/person/Person', array('code' => '01234567A'));
|
|
$I->seeResponseCodeIs(200);
|
|
$I->seeResponseIsJson();
|
|
$I->seeResponseContainsJson([
|
|
'success' => TRUE,
|
|
'message' => 'Person found']);
|
|
|
|
$I->sendGET('v1/person/person/Person', array('code' => '01234567A', 'email' => '[email protected]'));
|
|
$I->seeResponseCodeIs(200);
|
|
$I->seeResponseIsJson();
|
|
$I->seeResponseContainsJson([
|
|
'success' => TRUE,
|
|
'message' => 'Person found']); |