mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-10 00:29:27 +00:00
65aa2b5d29
- Fixes and improvements for PCRMLib
21 lines
673 B
PHP
21 lines
673 B
PHP
<?php
|
|
|
|
$I = new ApiTester($scenario);
|
|
$I->wantTo("Test API call v1/system/PCRM/Call");
|
|
$I->amHttpAuthenticated("admin", "1q2w3");
|
|
$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
|
|
|
|
$I->sendGET("v1/system/PCRM/Call", array(
|
|
"resource" => "codex/Bundesland_model", "function" => "load", "bundesland_code" => "1")
|
|
);
|
|
$I->seeResponseCodeIs(200);
|
|
$I->seeResponseIsJson();
|
|
$I->seeResponseContainsJson(["error" => 0]);
|
|
|
|
$I->sendGET("v1/system/PCRM/Call", array(
|
|
"resource" => "PermissionLib", "function" => "hasPermission",
|
|
"sn" => "bis.tbl_archiv", "pt" => "s")
|
|
);
|
|
$I->seeResponseCodeIs(200);
|
|
$I->seeResponseIsJson();
|
|
$I->seeResponseContainsJson(["error" => 0]); |