mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-28 09:29:38 +00:00
a3a9c42e99
- All the controllers exends APIv1_Controller rather than REST_Controller - Codeceptions modified to be compliant to changes
18 lines
538 B
PHP
18 lines
538 B
PHP
<?php
|
|
|
|
$I = new ApiTester($scenario);
|
|
$I->wantTo('Test the HTTP digest autentication when calling an API');
|
|
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
|
$I->sendGET('v1/Test/test');
|
|
$I->seeResponseCodeIs(200);
|
|
$I->seeResponseIsJson();
|
|
$I->seeResponseContainsJson([
|
|
'success' => true,
|
|
'message' => 'API HTTP GET call test succeed']);
|
|
|
|
$I->sendPOST('v1/Test/test');
|
|
$I->seeResponseCodeIs(200);
|
|
$I->seeResponseIsJson();
|
|
$I->seeResponseContainsJson([
|
|
'success' => true,
|
|
'message' => 'API HTTP POST call test succeed']); |