- Added codeception test cases

- Moved old libraries to CI
This commit is contained in:
paolo
2016-05-25 18:36:18 +02:00
parent 70fba4d267
commit 00211ee647
17 changed files with 147 additions and 13 deletions
@@ -0,0 +1,11 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/codex/bundesland/All');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/codex/bundesland/All');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
@@ -0,0 +1,11 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/content/dms/dms');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/content/dms/Dms', array('dms_id' => 1));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
@@ -0,0 +1,11 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/person/kontakt/kontakt');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/person/kontakt/kontakt', array('person_id' => 1));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
@@ -0,0 +1,16 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/codex/orgform Orgform and All');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/codex/orgform/Orgform', array('orgform_kurzbz' => 'VZ'));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
$I->sendGET('v1/codex/orgform/All');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
@@ -0,0 +1,16 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/crm/preinteressent Preinteressent and PreinteressentByPersonID');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/crm/preinteressent/Preinteressent', array('preinteressent_id' => 1));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
$I->sendGET('v1/crm/preinteressent/PreinteressentByPersonID', array('person_id' => 1));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
@@ -0,0 +1,16 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/crm/prestudent Prestudent and PrestudentByPersonID');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/crm/prestudent/Prestudent', array('prestudent_id' => 1));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
$I->sendGET('v1/crm/prestudent/PrestudentByPersonID', array('person_id' => 1));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
@@ -5,7 +5,7 @@ $I->wantTo('Test API call v1/organisation/studiengang Studiengang and AllForBewe
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/organisation/studiengang/Studiengang');
$I->sendGET('v1/organisation/studiengang/Studiengang', array('studiengang_kz' => 1));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
@@ -0,0 +1,21 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('Test API call v1/organisation/studiensemester studiensemester and nextStudiensemester');
$I->amHttpAuthenticated("admin", "1q2w3");
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('v1/organisation/studiensemester/Studiensemester', array('studiensemester_kurzbz' => 'WS2016'));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
$I->sendGET('v1/organisation/studiensemester/NextStudiensemester');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);
$I->sendGET('v1/organisation/studiensemester/NextStudiensemester', array('art' => 'WS'));
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['error' => 0]);