mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- Modified FHC_Model, now it is saving uid in CI session
- Added codeception tests - Added statistik to dump.sql - Moved old libraries to CI
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/person/kontakt/kontakt');
|
||||
$I->wantTo('Test API call v1/person/kontakt/ kontakt, KontaktByPersonID and KontaktByPersonIDKontaktTyp');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/person/kontakt/kontakt', array('kontakt_id' => 1));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/person/kontakt/KontaktByPersonID', array('person_id' => 3));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/person/kontakt/KontaktByPersonIDKontaktTyp', array('person_id' => 3, 'kontakttyp' => 'email'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -1,10 +1,15 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/codex/nation/All');
|
||||
$I->wantTo('Test API call v1/codex/nation/ nation and all');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/codex/nation/nation', array('nation_code' => 'A'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/codex/nation/All');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/codex/orgform Orgform and All');
|
||||
$I->wantTo('Test API call v1/codex/orgform Orgform, OrgformLV and All');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
@@ -13,4 +13,9 @@ $I->seeResponseContainsJson(['error' => 0]);
|
||||
$I->sendGET('v1/codex/orgform/All');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/codex/orgform/OrgformLV');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/person/person/person');
|
||||
$I->wantTo('Test API call v1/person/person/ Person and CheckBewerbung');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
@@ -32,4 +32,9 @@ $I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
'person_id' => '5',
|
||||
'nachname' => 'Harvey']);
|
||||
'nachname' => 'Harvey']);
|
||||
|
||||
$I->sendGET('v1/person/person/CheckBewerbung', array('email' => 'mckenzie.vicenta@calva.dev', 'studiensemester_kurzbz' => 'WS2016'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -10,7 +10,7 @@ $I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/crm/preinteressent/PreinteressentByPersonID', array('person_id' => 1));
|
||||
$I->sendGET('v1/crm/preinteressent/PreinteressentByPersonID', array('person_id' => 3));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -10,7 +10,7 @@ $I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/crm/prestudent/PrestudentByPersonID', array('person_id' => 1));
|
||||
$I->sendGET('v1/crm/prestudent/PrestudentByPersonID', array('person_id' => 3));
|
||||
$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/statistik statistik, All and MenueArray');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
$I->sendGET('v1/organisation/statistik/Statistik', array('statistik_kurzbz' => 'Stromanalyse'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/statistik/All');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/statistik/MenueArray');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('Test API call v1/organisation/studiensemester studiensemester and nextStudiensemester');
|
||||
$I->wantTo('Test API call to all v1/organisation/studiensemester methods');
|
||||
$I->amHttpAuthenticated("admin", "1q2w3");
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
|
||||
@@ -18,4 +18,64 @@ $I->seeResponseContainsJson(['error' => 0]);
|
||||
$I->sendGET('v1/organisation/studiensemester/NextStudiensemester', array('art' => 'WS'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/All');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/Akt');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/AktNext', array('semester' => '1'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/AktNext', array('semester' => '2'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/LastOrAktSemester');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/LastOrAktSemester', array('days' => '1024'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/NextFrom', array('studiensemester_kurzbz' => 'WS2015'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/Previous');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/Nearest', array('studiensemester_kurzbz' => 'WS2015'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/Finished');
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/Finished', array('limit' => '3'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
|
||||
$I->sendGET('v1/organisation/studiensemester/Timestamp', array('studiensemester_kurzbz' => 'WS2015'));
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->seeResponseIsJson();
|
||||
$I->seeResponseContainsJson(['error' => 0]);
|
||||
Reference in New Issue
Block a user