- phpC(d)I

- Renamed method chkRights to _isEntitled in model DB_Model
- Updated models where it was needed
This commit is contained in:
bison-paolo
2016-10-20 16:37:52 +02:00
parent 39b4c8057d
commit 5087826891
20 changed files with 152 additions and 126 deletions
@@ -0,0 +1,19 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo("Test API call v1/system/CallerLibrary/Call");
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET(
"v1/system/CallerLibrary/Call",
array(
"resource" => "PhrasesLib",
"function" => "getPhrase",
"phrase_id" => 1
)
);
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -0,0 +1,19 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo("Test API call v1/system/CallerModel/Call");
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org");
$I->sendGET(
"v1/system/CallerModel/Call",
array(
"resource" => "codex/Bundesland_model",
"function" => "load",
"bundesland_code" => "1"
)
);
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["error" => 0]);
$I->wait();
@@ -1,23 +0,0 @@
<?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->wait();
$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]);
$I->wait();