mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-28 09:29:38 +00:00
- Renamed classes, methods and properties names in german
- All the controllers exends APIv1_Controller rather than REST_Controller - Codeceptions modified to be compliant to changes
This commit is contained in:
+2
-2
@@ -4,14 +4,14 @@ $I = new ApiTester($scenario);
|
||||
$I->wantTo('Test the HTTP basic autentication whith HTTP GET and POST method and the API Keys');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
$I->sendGET('Test/test');
|
||||
$I->sendGET('v1/Test/test');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
'success' => true,
|
||||
'message' => 'API HTTP GET call test succeed']);
|
||||
|
||||
$I->sendPOST('Test/test');
|
||||
$I->sendPOST('v1/Test/test');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/studies/course/EnabledCourses');
|
||||
$I->amHttpAuthenticated("wu11e001", "1Q2W3E4R");
|
||||
$I->wantTo('Test API call v1/lehre/studiengang/AllForBewerbung');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
$I->sendGET('v1/studies/course/EnabledCourses');
|
||||
$I->sendGET('v1/lehre/studiengang/AllForBewerbung');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
$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('Test/test');
|
||||
$I->sendGET('v1/Test/test');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
'success' => true,
|
||||
'message' => 'API HTTP GET call test succeed']);
|
||||
$I->sendPOST('Test/test');
|
||||
|
||||
$I->sendPOST('v1/Test/test');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/nation All and FederalState');
|
||||
$I->amHttpAuthenticated("wu11e001", "1Q2W3E4R");
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
$I->sendGET('v1/nation/All');
|
||||
$I->seeResponseCodeIs(200);
|
||||
@@ -11,7 +11,7 @@ $I->seeResponseContainsJson([
|
||||
'success' => TRUE,
|
||||
'message' => 'Nation found']);
|
||||
|
||||
$I->sendGET('v1/nation/FederalState');
|
||||
$I->sendGET('v1/nation/Bundesland');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/person/person/Person');
|
||||
$I->amHttpAuthenticated("wu11e001", "1Q2W3E4R");
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
$I->sendGET('v1/person/person/Person', array('person_id' => 62788));
|
||||
$I->seeResponseCodeIs(200);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/studies/plan/Plan');
|
||||
$I->amHttpAuthenticated("wu11e001", "1Q2W3E4R");
|
||||
$I->wantTo('Test API call v1/lehre/studienplan/Studienplaene');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
$I->sendGET('v1/studies/plan/Plan', array('studiengang_kz' => 257));
|
||||
$I->sendGET('v1/lehre/studienplan/Studienplaene', array('studiengang_kz' => 257));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
|
||||
Reference in New Issue
Block a user