diff --git a/.gitignore b/.gitignore index 269134a25..5d327cef7 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ tests/codeception/codeception.yml tests/codeception/tests/api.suite.yml tests/codeception/tests/functional.suite.yml tests/codeception/tests/acceptance.suite.yml +tests/codeception/tests/unit.suite.yml /submodules/d3 composer.lock bin diff --git a/application/controllers/api/v1/Example.php b/application/controllers/api/v1/Example.php deleted file mode 100644 index ca6643e31..000000000 --- a/application/controllers/api/v1/Example.php +++ /dev/null @@ -1,150 +0,0 @@ -methods['user_get']['limit'] = 500; // 500 requests per hour per user/key - $this->methods['user_post']['limit'] = 100; // 100 requests per hour per user/key - $this->methods['user_delete']['limit'] = 50; // 50 requests per hour per user/key - } - - /** - * @return void - */ - public function users_get() - { - // Users from a data store e.g. database - $users = [ - ['id' => 1, 'name' => 'John', 'email' => 'john@example.com', 'fact' => 'Loves coding'], - ['id' => 2, 'name' => 'Jim', 'email' => 'jim@example.com', 'fact' => 'Developed on CodeIgniter'], - ['id' => 3, 'name' => 'Jane', 'email' => 'jane@example.com', 'fact' => 'Lives in the USA', ['hobbies' => ['guitar', 'cycling']]], - ]; - - $id = $this->get('id'); - - // If the id parameter doesn't exist return all the users - - if ($id === null) - { - // Check if the users data store contains users (in case the database result returns null) - if ($users) - { - // Set the response and exit - $this->response($users, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code - } - else - { - // Set the response and exit - $this->response([ - 'status' => false, - 'message' => 'No users were found' - ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code - } - } - - // Find and return a single record for a particular user. - - $id = (int)$id; - - // Validate the id. - if ($id <= 0) - { - // Invalid id, set the response and exit. - $this->response(null, REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code - } - - // Get the user from the array, using the id as key for retreival. - // Usually a model is to be used for this. - - $user = null; - - if (!empty($users)) - { - foreach ($users as $key => $value) - { - if (isset($value['id']) && $value['id'] === $id) - { - $user = $value; - } - } - } - - if (!empty($user)) - { - $this->set_response($user, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code - } - else - { - $this->set_response([ - 'status' => false, - 'message' => 'User could not be found' - ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code - } - } - - /** - * @return void - */ - public function users_post() - { - // $this->some_model->update_user( ... ); - $message = [ - 'id' => 100, // Automatically generated by the model - 'name' => $this->post('name'), - 'email' => $this->post('email'), - 'message' => 'Added a resource' - ]; - - $this->set_response($message, REST_Controller::HTTP_CREATED); // CREATED (201) being the HTTP response code - } - - /** - * @return void - */ - public function users_delete() - { - $id = (int)$this->get('id'); - - // Validate the id. - if ($id <= 0) - { - // Set the response and exit - $this->response(null, REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code - } - - // $this->some_model->delete_something($id); - $message = [ - 'id' => $id, - 'message' => 'Deleted the resource' - ]; - - // NO_CONTENT (204) being the HTTP response code - $this->set_response($message, REST_Controller::HTTP_NO_CONTENT); - } -} diff --git a/application/controllers/api/v1/Ping.php b/application/controllers/api/v1/Ping.php deleted file mode 100644 index a4ca0d4a1..000000000 --- a/application/controllers/api/v1/Ping.php +++ /dev/null @@ -1,56 +0,0 @@ -methods['ping_get']['limit'] = 500; // 500 requests per hour per user/key - } - - /** - * Responds to ping attempts of applications - * @return string JSON which acknowledges the ping attempt - * @example http://wsp.fortyseeds.at/backend/api/ping - */ - public function index_get() - { - $payload = [ - 'success' => true, - 'message' => 'ping received' - ]; - - // Set the response and exit - $this->response($payload, REST_Controller::HTTP_OK); - } -} diff --git a/application/controllers/api/v1/Test.php b/application/controllers/api/v1/Test.php index c036973f5..1b4dc5c82 100644 --- a/application/controllers/api/v1/Test.php +++ b/application/controllers/api/v1/Test.php @@ -25,7 +25,8 @@ class Test extends APIv1_Controller { $payload = [ 'success' => TRUE, - 'message' => 'API HTTP GET call test succeed' + 'message' => 'API HTTP GET call test succeed', + 'error' => 0 ]; $httpstatus = REST_Controller::HTTP_OK; $this->response($payload, $httpstatus); @@ -42,7 +43,8 @@ class Test extends APIv1_Controller { $payload = [ 'success' => TRUE, - 'message' => 'API HTTP POST call test succeed' + 'message' => 'API HTTP POST call test succeed', + 'error' => 0 ]; $httpstatus = REST_Controller::HTTP_OK; $this->response($payload, $httpstatus); diff --git a/application/models/testtool/Kriterien_model.php b/application/models/testtool/Kriterien_model.php index cd9a7c874..83d0fb97c 100644 --- a/application/models/testtool/Kriterien_model.php +++ b/application/models/testtool/Kriterien_model.php @@ -9,6 +9,6 @@ class Kriterien_model extends DB_Model { parent::__construct(); $this->dbTable = 'testtool.tbl_kriterien'; - $this->pk = ''; + $this->pk = 'kategorie_kurzbz'; } } diff --git a/tests/codeception/_support/BasisKlasseTest.php b/tests/codeception/_support/BasisKlasseTest.php deleted file mode 100644 index c598355ac..000000000 --- a/tests/codeception/_support/BasisKlasseTest.php +++ /dev/null @@ -1,27 +0,0 @@ -errormsg=true; - $this->assertTrue($bc->getErrorMsg()); - } - -} diff --git a/tests/codeception/_support/UnitTester.php b/tests/codeception/_support/UnitTester.php new file mode 100644 index 000000000..7ad121442 --- /dev/null +++ b/tests/codeception/_support/UnitTester.php @@ -0,0 +1,25 @@ +get') !== false) + { + $parameters = explode('\'', $line); + if (count($parameters) >= 2) + { + $functions[$functionsCounter]['parameters'][] = $parameters[1]; + } + else + { + $parameters = explode('"', $line); + if (count($parameters) >= 2) + { + $functions[$functionsCounter]['parameters'][] = $parameters[1]; + } + } + } + } + + fclose($fileHandle); // Closing the file pointer is always a good thing + + // Gets the path of the api + $apiPath = trim(str_replace('../../../../application/controllers/api/', ' ', $file)); + $apiPath = substr($apiPath, 0, strrpos($apiPath, '/') + 1); + // Prefix of the test file name given by the parent folder + $namePrefix = trim(str_replace('v1/', ' ', $apiPath)); + $namePrefix = ucfirst(trim(str_replace('/', ' ', $namePrefix))); + + // If if is not a fake + if (trim($name) != '') + { + // Where to create the test files + $testDir = './v1/'; + // If the test file is not already present + if (!file_exists($testDir.$namePrefix.$name.'Cept.php')) + { + // Create and open the test file for writing + if (($fileTestHandle = fopen($testDir.$namePrefix.$name.'Cept.php', 'w')) !== false) + { + // Lst of function to place in the header + $strLstFunctions = ''; + for($i = 0; $i < count($functions); $i++) + { + $function = $functions[$i]; + if ($i == 0) + { + $strLstFunctions .= $apiPath.$name.'/'.': '; + } + + $strLstFunctions .= $function['name']; + + if ($i < count($functions) - 1) + { + $strLstFunctions .= ' '; + } + } + + // Create the test file header using the template + $strToWrite = str_replace('_CALL_', $strLstFunctions, $fileTplHead); + // Writes the header into the test file + if (fwrite($fileTestHandle, $strToWrite."\n") === false) + { + echo 'Error!!!'; + } + + // For every function create a call + foreach($functions as $function) + { + // Gets a list of parameters + $strLstParameters = ''; + for($i = 0; $i < count($function['parameters']); $i++) + { + $parameter = $function['parameters'][$i]; + $strLstParameters .= '"'.$parameter.'" => "1"'; + if ($i < count($function['parameters']) - 1) + { + $strLstParameters .= ", "; + } + } + // Create the call using the template + $strToWrite = str_replace('_CALL_', $apiPath.$name.'/'.$function['name'], $fileTplCall); + $strToWrite = str_replace('_PARAMETERS_', $strLstParameters, $strToWrite); + // Write it into the test file + if (fwrite($fileTestHandle, $strToWrite."\n") === false) + { + echo 'Error!!!'; + } + } + + fclose($fileTestHandle); // As usual + } + else + { + echo "Error opening file: ".$testDir.$name.'Cept.php'."\n"; + } + } + else + { + echo $testDir.$name."Cept.php is already present\n"; + } + } + } + } + +?> \ No newline at end of file diff --git a/tests/codeception/tests/api/template_call.tpl b/tests/codeception/tests/api/template_call.tpl new file mode 100644 index 000000000..1a66009bd --- /dev/null +++ b/tests/codeception/tests/api/template_call.tpl @@ -0,0 +1,5 @@ +$I->sendGET("_CALL_", array(_PARAMETERS_)); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/template_head.tpl b/tests/codeception/tests/api/template_head.tpl new file mode 100644 index 000000000..f0a72ba64 --- /dev/null +++ b/tests/codeception/tests/api/template_head.tpl @@ -0,0 +1,6 @@ +wantTo("Test API call _CALL_"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/AufteilungCept.php b/tests/codeception/tests/api/v1/AccountingAufteilungCept.php similarity index 75% rename from tests/codeception/tests/api/v1/AufteilungCept.php rename to tests/codeception/tests/api/v1/AccountingAufteilungCept.php index f82cdcd1c..e25bb2bb2 100644 --- a/tests/codeception/tests/api/v1/AufteilungCept.php +++ b/tests/codeception/tests/api/v1/AccountingAufteilungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Aufteilung/Aufteilung"); +$I->wantTo("Test API call v1/accounting/Aufteilung/: Aufteilung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Aufteilung/Aufteilung", array("aufteilung_id" => "0")); +$I->sendGET("v1/accounting/Aufteilung/Aufteilung", array("aufteilung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BestelldetailCept.php b/tests/codeception/tests/api/v1/AccountingBestelldetailCept.php similarity index 73% rename from tests/codeception/tests/api/v1/BestelldetailCept.php rename to tests/codeception/tests/api/v1/AccountingBestelldetailCept.php index 12a6be28c..129b1fe77 100644 --- a/tests/codeception/tests/api/v1/BestelldetailCept.php +++ b/tests/codeception/tests/api/v1/AccountingBestelldetailCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Bestelldetail/Bestelldetail"); +$I->wantTo("Test API call v1/accounting/Bestelldetail/: Bestelldetail"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Bestelldetail/Bestelldetail", array("bestelldetail_id" => "0")); +$I->sendGET("v1/accounting/Bestelldetail/Bestelldetail", array("bestelldetail_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BestelldetailtagCept.php b/tests/codeception/tests/api/v1/AccountingBestelldetailtagCept.php similarity index 68% rename from tests/codeception/tests/api/v1/BestelldetailtagCept.php rename to tests/codeception/tests/api/v1/AccountingBestelldetailtagCept.php index 377660926..44047ccf8 100644 --- a/tests/codeception/tests/api/v1/BestelldetailtagCept.php +++ b/tests/codeception/tests/api/v1/AccountingBestelldetailtagCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Bestelldetailtag/Bestelldetailtag"); +$I->wantTo("Test API call v1/accounting/Bestelldetailtag/: Bestelldetailtag"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Bestelldetailtag/Bestelldetailtag", array("bestelldetail_id" => "0", "tag" => "0")); +$I->sendGET("v1/accounting/Bestelldetailtag/Bestelldetailtag", array("bestelldetail_id" => "1", "tag" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BestellstatusCept.php b/tests/codeception/tests/api/v1/AccountingBestellstatusCept.php similarity index 72% rename from tests/codeception/tests/api/v1/BestellstatusCept.php rename to tests/codeception/tests/api/v1/AccountingBestellstatusCept.php index 41556b2e3..f6bd8d835 100644 --- a/tests/codeception/tests/api/v1/BestellstatusCept.php +++ b/tests/codeception/tests/api/v1/AccountingBestellstatusCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Bestellstatus/Bestellstatus"); +$I->wantTo("Test API call v1/accounting/Bestellstatus/: Bestellstatus"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Bestellstatus/Bestellstatus", array("bestellstatus_kurzbz" => "0")); +$I->sendGET("v1/accounting/Bestellstatus/Bestellstatus", array("bestellstatus_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BestellungCept.php b/tests/codeception/tests/api/v1/AccountingBestellungCept.php similarity index 75% rename from tests/codeception/tests/api/v1/BestellungCept.php rename to tests/codeception/tests/api/v1/AccountingBestellungCept.php index f9f87bf12..5d2d27e8e 100644 --- a/tests/codeception/tests/api/v1/BestellungCept.php +++ b/tests/codeception/tests/api/v1/AccountingBestellungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Bestellung/Bestellung"); +$I->wantTo("Test API call v1/accounting/Bestellung/: Bestellung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Bestellung/Bestellung", array("bestellung_id" => "0")); +$I->sendGET("v1/accounting/Bestellung/Bestellung", array("bestellung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BestellungtagCept.php b/tests/codeception/tests/api/v1/AccountingBestellungtagCept.php similarity index 71% rename from tests/codeception/tests/api/v1/BestellungtagCept.php rename to tests/codeception/tests/api/v1/AccountingBestellungtagCept.php index 9f93371d0..012cc11f1 100644 --- a/tests/codeception/tests/api/v1/BestellungtagCept.php +++ b/tests/codeception/tests/api/v1/AccountingBestellungtagCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Bestellungtag/Bestellungtag"); +$I->wantTo("Test API call v1/accounting/Bestellungtag/: Bestellungtag"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Bestellungtag/Bestellungtag", array("bestellung_id" => "0", "tag" => "0")); +$I->sendGET("v1/accounting/Bestellungtag/Bestellungtag", array("bestellung_id" => "1", "tag" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BuchungCept.php b/tests/codeception/tests/api/v1/AccountingBuchungCept.php similarity index 78% rename from tests/codeception/tests/api/v1/BuchungCept.php rename to tests/codeception/tests/api/v1/AccountingBuchungCept.php index bea099fff..d5d88e407 100644 --- a/tests/codeception/tests/api/v1/BuchungCept.php +++ b/tests/codeception/tests/api/v1/AccountingBuchungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Buchung/Buchung"); +$I->wantTo("Test API call v1/accounting/Buchung/: Buchung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Buchung/Buchung", array("buchung_id" => "0")); +$I->sendGET("v1/accounting/Buchung/Buchung", array("buchung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/Buchungstyp2Cept.php b/tests/codeception/tests/api/v1/AccountingBuchungstypCept.php similarity index 74% rename from tests/codeception/tests/api/v1/Buchungstyp2Cept.php rename to tests/codeception/tests/api/v1/AccountingBuchungstypCept.php index b03bb3818..69e734854 100644 --- a/tests/codeception/tests/api/v1/Buchungstyp2Cept.php +++ b/tests/codeception/tests/api/v1/AccountingBuchungstypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Buchungstyp/Buchungstyp"); +$I->wantTo("Test API call v1/accounting/Buchungstyp/: Buchungstyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Buchungstyp/Buchungstyp", array("buchungstyp_kurzbz" => "0")); +$I->sendGET("v1/accounting/Buchungstyp/Buchungstyp", array("buchungstyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BudgetCept.php b/tests/codeception/tests/api/v1/AccountingBudgetCept.php similarity index 72% rename from tests/codeception/tests/api/v1/BudgetCept.php rename to tests/codeception/tests/api/v1/AccountingBudgetCept.php index c8a7f2f4d..3f0203b24 100644 --- a/tests/codeception/tests/api/v1/BudgetCept.php +++ b/tests/codeception/tests/api/v1/AccountingBudgetCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Budget/Budget"); +$I->wantTo("Test API call v1/accounting/Budget/: Budget"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Budget/Budget", array("kostenstelle_id" => "0", "geschaeftsjahr_kurzbz" => "0")); +$I->sendGET("v1/accounting/Budget/Budget", array("kostenstelle_id" => "1", "geschaeftsjahr_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/KontaktCept.php b/tests/codeception/tests/api/v1/AccountingKontoCept.php similarity index 65% rename from tests/codeception/tests/api/v1/KontaktCept.php rename to tests/codeception/tests/api/v1/AccountingKontoCept.php index d4c16ac65..99bf3ba88 100644 --- a/tests/codeception/tests/api/v1/KontaktCept.php +++ b/tests/codeception/tests/api/v1/AccountingKontoCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/kontakt/Kontakt"); +$I->wantTo("Test API call v1/accounting/Konto/: Konto"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/kontakt/Kontakt", array("kontakt_id" => 0)); +$I->sendGET("v1/accounting/Konto/Konto", array("konto_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/KostenstelleCept.php b/tests/codeception/tests/api/v1/AccountingKostenstelleCept.php similarity index 73% rename from tests/codeception/tests/api/v1/KostenstelleCept.php rename to tests/codeception/tests/api/v1/AccountingKostenstelleCept.php index d2aae9684..45ea0c016 100644 --- a/tests/codeception/tests/api/v1/KostenstelleCept.php +++ b/tests/codeception/tests/api/v1/AccountingKostenstelleCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Kostenstelle/Kostenstelle"); +$I->wantTo("Test API call v1/accounting/Kostenstelle/: Kostenstelle"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Kostenstelle/Kostenstelle", array("kostenstelle_id" => "0")); +$I->sendGET("v1/accounting/Kostenstelle/Kostenstelle", array("kostenstelle_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/RechnungCept.php b/tests/codeception/tests/api/v1/AccountingRechnungCept.php similarity index 77% rename from tests/codeception/tests/api/v1/RechnungCept.php rename to tests/codeception/tests/api/v1/AccountingRechnungCept.php index ce8517eb0..4b14c31b6 100644 --- a/tests/codeception/tests/api/v1/RechnungCept.php +++ b/tests/codeception/tests/api/v1/AccountingRechnungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Rechnung/Rechnung"); +$I->wantTo("Test API call v1/accounting/Rechnung/: Rechnung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Rechnung/Rechnung", array("rechnung_id" => "0")); +$I->sendGET("v1/accounting/Rechnung/Rechnung", array("rechnung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/RechnungsbetragCept.php b/tests/codeception/tests/api/v1/AccountingRechnungsbetragCept.php similarity index 71% rename from tests/codeception/tests/api/v1/RechnungsbetragCept.php rename to tests/codeception/tests/api/v1/AccountingRechnungsbetragCept.php index 1f40823c1..46c30f8b2 100644 --- a/tests/codeception/tests/api/v1/RechnungsbetragCept.php +++ b/tests/codeception/tests/api/v1/AccountingRechnungsbetragCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Rechnungsbetrag/Rechnungsbetrag"); +$I->wantTo("Test API call v1/accounting/Rechnungsbetrag/: Rechnungsbetrag"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Rechnungsbetrag/Rechnungsbetrag", array("rechnungsbetrag_id" => "0")); +$I->sendGET("v1/accounting/Rechnungsbetrag/Rechnungsbetrag", array("rechnungsbetrag_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/RechnungstypCept.php b/tests/codeception/tests/api/v1/AccountingRechnungstypCept.php similarity index 73% rename from tests/codeception/tests/api/v1/RechnungstypCept.php rename to tests/codeception/tests/api/v1/AccountingRechnungstypCept.php index ec76d9922..92ad4c55b 100644 --- a/tests/codeception/tests/api/v1/RechnungstypCept.php +++ b/tests/codeception/tests/api/v1/AccountingRechnungstypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Rechnungstyp/Rechnungstyp"); +$I->wantTo("Test API call v1/accounting/Rechnungstyp/: Rechnungstyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Rechnungstyp/Rechnungstyp", array("rechnungstyp_kurzbz" => "0")); +$I->sendGET("v1/accounting/Rechnungstyp/Rechnungstyp", array("rechnungstyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/VertragCept.php b/tests/codeception/tests/api/v1/AccountingVertragCept.php similarity index 78% rename from tests/codeception/tests/api/v1/VertragCept.php rename to tests/codeception/tests/api/v1/AccountingVertragCept.php index be52bc754..6533fba2f 100644 --- a/tests/codeception/tests/api/v1/VertragCept.php +++ b/tests/codeception/tests/api/v1/AccountingVertragCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Vertrag/Vertrag"); +$I->wantTo("Test API call v1/accounting/Vertrag/: Vertrag"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Vertrag/Vertrag", array("vertrag_id" => "0")); +$I->sendGET("v1/accounting/Vertrag/Vertrag", array("vertrag_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/VertragsstatusCept.php b/tests/codeception/tests/api/v1/AccountingVertragsstatusCept.php similarity index 71% rename from tests/codeception/tests/api/v1/VertragsstatusCept.php rename to tests/codeception/tests/api/v1/AccountingVertragsstatusCept.php index bcd766a04..376614e51 100644 --- a/tests/codeception/tests/api/v1/VertragsstatusCept.php +++ b/tests/codeception/tests/api/v1/AccountingVertragsstatusCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Vertragsstatus/Vertragsstatus"); +$I->wantTo("Test API call v1/accounting/Vertragsstatus/: Vertragsstatus"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Vertragsstatus/Vertragsstatus", array("vertragsstatus_kurzbz" => "0")); +$I->sendGET("v1/accounting/Vertragsstatus/Vertragsstatus", array("vertragsstatus_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/VertragstypCept.php b/tests/codeception/tests/api/v1/AccountingVertragstypCept.php similarity index 74% rename from tests/codeception/tests/api/v1/VertragstypCept.php rename to tests/codeception/tests/api/v1/AccountingVertragstypCept.php index 010c615d7..945065ac9 100644 --- a/tests/codeception/tests/api/v1/VertragstypCept.php +++ b/tests/codeception/tests/api/v1/AccountingVertragstypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Vertragstyp/Vertragstyp"); +$I->wantTo("Test API call v1/accounting/Vertragstyp/: Vertragstyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Vertragstyp/Vertragstyp", array("vertragstyp_kurzbz" => "0")); +$I->sendGET("v1/accounting/Vertragstyp/Vertragstyp", array("vertragstyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZahlungstypCept.php b/tests/codeception/tests/api/v1/AccountingZahlungstypCept.php similarity index 74% rename from tests/codeception/tests/api/v1/ZahlungstypCept.php rename to tests/codeception/tests/api/v1/AccountingZahlungstypCept.php index e22ef0c68..0ad9f031d 100644 --- a/tests/codeception/tests/api/v1/ZahlungstypCept.php +++ b/tests/codeception/tests/api/v1/AccountingZahlungstypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/Zahlungstyp/Zahlungstyp"); +$I->wantTo("Test API call v1/accounting/Zahlungstyp/: Zahlungstyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/Zahlungstyp/Zahlungstyp", array("zahlungstyp_kurzbz" => "0")); +$I->sendGET("v1/accounting/Zahlungstyp/Zahlungstyp", array("zahlungstyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AkteCept.php b/tests/codeception/tests/api/v1/AkteCept.php deleted file mode 100644 index be24e09f3..000000000 --- a/tests/codeception/tests/api/v1/AkteCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/crm/Akte/Akte"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Akte/Akte", array("akte_id" => "0", "person_id" => "0", "dokument_kurzbz" => "0", "stg_kz" => "0", "prestudent_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/AnrechnungCept.php b/tests/codeception/tests/api/v1/AnrechnungCept.php deleted file mode 100644 index 1cf5911db..000000000 --- a/tests/codeception/tests/api/v1/AnrechnungCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/anrechnung/Anrechnung"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/anrechnung/Anrechnung", array("anrechnung_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/AppdatenCept.php b/tests/codeception/tests/api/v1/AppdatenCept.php deleted file mode 100644 index fd070df03..000000000 --- a/tests/codeception/tests/api/v1/AppdatenCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/system/appdaten/Appdaten"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/appdaten/Appdaten", array("appdaten_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/BasicLoginCept.php b/tests/codeception/tests/api/v1/BasicLoginCept.php deleted file mode 100644 index f8ee448c4..000000000 --- a/tests/codeception/tests/api/v1/BasicLoginCept.php +++ /dev/null @@ -1,19 +0,0 @@ -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('v1/Test/test'); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson([ - 'success' => true, - 'message' => 'API HTTP GET call test succeed']); - -$I->sendPOST('v1/Test/test'); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson([ - 'success' => true, - 'message' => 'API HTTP POST call test succeed']); diff --git a/tests/codeception/tests/api/v1/BeispielCept.php b/tests/codeception/tests/api/v1/BeispielCept.php deleted file mode 100644 index 1704a2e16..000000000 --- a/tests/codeception/tests/api/v1/BeispielCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/beispiel/Beispiel"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/beispiel/Beispiel", array("beispiel_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/BenutzerCept.php b/tests/codeception/tests/api/v1/BenutzerCept.php deleted file mode 100644 index 6936a85cc..000000000 --- a/tests/codeception/tests/api/v1/BenutzerCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/person/Benutzer/Benutzer"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Benutzer/Benutzer", array("uid" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/BetreuerartCept.php b/tests/codeception/tests/api/v1/BetreuerartCept.php deleted file mode 100644 index 14879ab77..000000000 --- a/tests/codeception/tests/api/v1/BetreuerartCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/betreuerart/Betreuerart"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/betreuerart/Betreuerart", array("betreuerart_kurzbz" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/BetriebsmittelpersonCept.php b/tests/codeception/tests/api/v1/BetriebsmittelpersonCept.php deleted file mode 100644 index 6432d88db..000000000 --- a/tests/codeception/tests/api/v1/BetriebsmittelpersonCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/ressource/betriebsmittelperson/Betriebsmittelperson"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/betriebsmittelperson/Betriebsmittelperson", array("betriebsmittelperson_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/BewerbungstermineCept.php b/tests/codeception/tests/api/v1/BewerbungstermineCept.php deleted file mode 100644 index 864f379f8..000000000 --- a/tests/codeception/tests/api/v1/BewerbungstermineCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/crm/Bewerbungstermine/Bewerbungstermine"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Bewerbungstermine/Bewerbungstermine", array("bewerbungstermine_id" => "0", "studiengang_kz" => "0", "studiensemester_kurzbz" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/CeptTemplate.php b/tests/codeception/tests/api/v1/CeptTemplate.php deleted file mode 100644 index 34b0c9a12..000000000 --- a/tests/codeception/tests/api/v1/CeptTemplate.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call TO_BE_REPLACED_NAME"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("TO_BE_REPLACED_NAME", array(TO_BE_REPLACED_PARAMETERS)); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/CheckUserAuthCept.php b/tests/codeception/tests/api/v1/CheckUserAuthCept.php index 83eb21c9b..56afcdcce 100644 --- a/tests/codeception/tests/api/v1/CheckUserAuthCept.php +++ b/tests/codeception/tests/api/v1/CheckUserAuthCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/CheckUserAuth/CheckByUsernamePassword"); +$I->wantTo("Test API call v1/CheckUserAuth/: CheckByUsernamePassword"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/CheckUserAuth/CheckByUsernamePassword", array("username" => "admin", "password" => "1q2w3")); +$I->sendGET("v1/CheckUserAuth/CheckByUsernamePassword", array("username" => "1", "password" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AkadgradCept.php b/tests/codeception/tests/api/v1/CodexAkadgradCept.php similarity index 79% rename from tests/codeception/tests/api/v1/AkadgradCept.php rename to tests/codeception/tests/api/v1/CodexAkadgradCept.php index 208705ccd..182d6a9a0 100644 --- a/tests/codeception/tests/api/v1/AkadgradCept.php +++ b/tests/codeception/tests/api/v1/CodexAkadgradCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Akadgrad/Akadgrad"); +$I->wantTo("Test API call v1/codex/Akadgrad/: Akadgrad"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Akadgrad/Akadgrad", array("akadgrad_id" => "0")); +$I->sendGET("v1/codex/Akadgrad/Akadgrad", array("akadgrad_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/FrageCept.php b/tests/codeception/tests/api/v1/CodexArchivCept.php similarity index 65% rename from tests/codeception/tests/api/v1/FrageCept.php rename to tests/codeception/tests/api/v1/CodexArchivCept.php index 048255292..fc4d9c8e4 100644 --- a/tests/codeception/tests/api/v1/FrageCept.php +++ b/tests/codeception/tests/api/v1/CodexArchivCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/testtool/Frage/Frage"); +$I->wantTo("Test API call v1/codex/Archiv/: Archiv"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/testtool/Frage/Frage", array("frage_id" => "0")); +$I->sendGET("v1/codex/Archiv/Archiv", array("archiv_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AufmerksamdurchCept.php b/tests/codeception/tests/api/v1/CodexAufmerksamdurchCept.php similarity index 72% rename from tests/codeception/tests/api/v1/AufmerksamdurchCept.php rename to tests/codeception/tests/api/v1/CodexAufmerksamdurchCept.php index 43c1e3727..aa10c8df5 100644 --- a/tests/codeception/tests/api/v1/AufmerksamdurchCept.php +++ b/tests/codeception/tests/api/v1/CodexAufmerksamdurchCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Aufmerksamdurch/Aufmerksamdurch"); +$I->wantTo("Test API call v1/codex/Aufmerksamdurch/: Aufmerksamdurch"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Aufmerksamdurch/Aufmerksamdurch", array("aufmerksamdurch_kurzbz" => "0")); +$I->sendGET("v1/codex/Aufmerksamdurch/Aufmerksamdurch", array("aufmerksamdurch_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AusbildungCept.php b/tests/codeception/tests/api/v1/CodexAusbildungCept.php similarity index 77% rename from tests/codeception/tests/api/v1/AusbildungCept.php rename to tests/codeception/tests/api/v1/CodexAusbildungCept.php index 71abd2a18..32b6c6a03 100644 --- a/tests/codeception/tests/api/v1/AusbildungCept.php +++ b/tests/codeception/tests/api/v1/CodexAusbildungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Ausbildung/Ausbildung"); +$I->wantTo("Test API call v1/codex/Ausbildung/: Ausbildung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Ausbildung/Ausbildung", array("ausbildungcode" => "0")); +$I->sendGET("v1/codex/Ausbildung/Ausbildung", array("ausbildungcode" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BerufstaetigkeitCept.php b/tests/codeception/tests/api/v1/CodexBerufstaetigkeitCept.php similarity index 71% rename from tests/codeception/tests/api/v1/BerufstaetigkeitCept.php rename to tests/codeception/tests/api/v1/CodexBerufstaetigkeitCept.php index d2c2f6f76..397f6f936 100644 --- a/tests/codeception/tests/api/v1/BerufstaetigkeitCept.php +++ b/tests/codeception/tests/api/v1/CodexBerufstaetigkeitCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Berufstaetigkeit/Berufstaetigkeit"); +$I->wantTo("Test API call v1/codex/Berufstaetigkeit/: Berufstaetigkeit"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Berufstaetigkeit/Berufstaetigkeit", array("berufstaetigkeit_code" => "0")); +$I->sendGET("v1/codex/Berufstaetigkeit/Berufstaetigkeit", array("berufstaetigkeit_code" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BeschaeftigungsausmassCept.php b/tests/codeception/tests/api/v1/CodexBeschaeftigungsausmassCept.php similarity index 68% rename from tests/codeception/tests/api/v1/BeschaeftigungsausmassCept.php rename to tests/codeception/tests/api/v1/CodexBeschaeftigungsausmassCept.php index 68a880e25..804b55690 100644 --- a/tests/codeception/tests/api/v1/BeschaeftigungsausmassCept.php +++ b/tests/codeception/tests/api/v1/CodexBeschaeftigungsausmassCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Beschaeftigungsausmass/Beschaeftigungsausmass"); +$I->wantTo("Test API call v1/codex/Beschaeftigungsausmass/: Beschaeftigungsausmass"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Beschaeftigungsausmass/Beschaeftigungsausmass", array("beschausmasscode" => "0")); +$I->sendGET("v1/codex/Beschaeftigungsausmass/Beschaeftigungsausmass", array("beschausmasscode" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BesqualCept.php b/tests/codeception/tests/api/v1/CodexBesqualCept.php similarity index 80% rename from tests/codeception/tests/api/v1/BesqualCept.php rename to tests/codeception/tests/api/v1/CodexBesqualCept.php index 7c573d770..fa289f714 100644 --- a/tests/codeception/tests/api/v1/BesqualCept.php +++ b/tests/codeception/tests/api/v1/CodexBesqualCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Besqual/Besqual"); +$I->wantTo("Test API call v1/codex/Besqual/: Besqual"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Besqual/Besqual", array("besqualcode" => "0")); +$I->sendGET("v1/codex/Besqual/Besqual", array("besqualcode" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BisfunktionCept.php b/tests/codeception/tests/api/v1/CodexBisfunktionCept.php similarity index 71% rename from tests/codeception/tests/api/v1/BisfunktionCept.php rename to tests/codeception/tests/api/v1/CodexBisfunktionCept.php index d3fca1ef5..eca9995fb 100644 --- a/tests/codeception/tests/api/v1/BisfunktionCept.php +++ b/tests/codeception/tests/api/v1/CodexBisfunktionCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Bisfunktion/Bisfunktion"); +$I->wantTo("Test API call v1/codex/Bisfunktion/: Bisfunktion"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Bisfunktion/Bisfunktion", array("studiengang_kz" => "0", "bisverwendung_id" => "0")); +$I->sendGET("v1/codex/Bisfunktion/Bisfunktion", array("studiengang_kz" => "1", "bisverwendung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/CodexBisioCept.php b/tests/codeception/tests/api/v1/CodexBisioCept.php new file mode 100644 index 000000000..81f4dc743 --- /dev/null +++ b/tests/codeception/tests/api/v1/CodexBisioCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/codex/Bisio/: Bisio"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/codex/Bisio/Bisio", array("bisio_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BisorgformCept.php b/tests/codeception/tests/api/v1/CodexBisorgformCept.php similarity index 76% rename from tests/codeception/tests/api/v1/BisorgformCept.php rename to tests/codeception/tests/api/v1/CodexBisorgformCept.php index bce53ed51..44b34c0c6 100644 --- a/tests/codeception/tests/api/v1/BisorgformCept.php +++ b/tests/codeception/tests/api/v1/CodexBisorgformCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Bisorgform/Bisorgform"); +$I->wantTo("Test API call v1/codex/Bisorgform/: Bisorgform"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Bisorgform/Bisorgform", array("bisorgform_kurzbz" => "0")); +$I->sendGET("v1/codex/Bisorgform/Bisorgform", array("bisorgform_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BisverwendungCept.php b/tests/codeception/tests/api/v1/CodexBisverwendungCept.php similarity index 74% rename from tests/codeception/tests/api/v1/BisverwendungCept.php rename to tests/codeception/tests/api/v1/CodexBisverwendungCept.php index 333af1859..678bb5e0e 100644 --- a/tests/codeception/tests/api/v1/BisverwendungCept.php +++ b/tests/codeception/tests/api/v1/CodexBisverwendungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Bisverwendung/Bisverwendung"); +$I->wantTo("Test API call v1/codex/Bisverwendung/: Bisverwendung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Bisverwendung/Bisverwendung", array("bisverwendung_id" => "0")); +$I->sendGET("v1/codex/Bisverwendung/Bisverwendung", array("bisverwendung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/TagCept.php b/tests/codeception/tests/api/v1/CodexBundeslandCept.php similarity index 67% rename from tests/codeception/tests/api/v1/TagCept.php rename to tests/codeception/tests/api/v1/CodexBundeslandCept.php index 0e91b5ff2..202ce113b 100644 --- a/tests/codeception/tests/api/v1/TagCept.php +++ b/tests/codeception/tests/api/v1/CodexBundeslandCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Tag/Tag"); +$I->wantTo("Test API call v1/codex/Bundesland/: All"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Tag/Tag", array("tag" => "0")); +$I->sendGET("v1/codex/Bundesland/All", array()); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EntwicklungsteamCept.php b/tests/codeception/tests/api/v1/CodexEntwicklungsteamCept.php similarity index 68% rename from tests/codeception/tests/api/v1/EntwicklungsteamCept.php rename to tests/codeception/tests/api/v1/CodexEntwicklungsteamCept.php index cc74f30fe..f85cc45ed 100644 --- a/tests/codeception/tests/api/v1/EntwicklungsteamCept.php +++ b/tests/codeception/tests/api/v1/CodexEntwicklungsteamCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Entwicklungsteam/Entwicklungsteam"); +$I->wantTo("Test API call v1/codex/Entwicklungsteam/: Entwicklungsteam"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Entwicklungsteam/Entwicklungsteam", array("studiengang_kz" => "0", "mitarbeiter_uid" => "0")); +$I->sendGET("v1/codex/Entwicklungsteam/Entwicklungsteam", array("studiengang_kz" => "1", "mitarbeiter_uid" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/Studiengang2Cept.php b/tests/codeception/tests/api/v1/CodexGemeindeCept.php similarity index 58% rename from tests/codeception/tests/api/v1/Studiengang2Cept.php rename to tests/codeception/tests/api/v1/CodexGemeindeCept.php index 763597d13..8226f8530 100644 --- a/tests/codeception/tests/api/v1/Studiengang2Cept.php +++ b/tests/codeception/tests/api/v1/CodexGemeindeCept.php @@ -1,18 +1,16 @@ wantTo("Test API call v1/organisation/studiengang Studiengang and AllForBewerbung"); +$I->wantTo("Test API call v1/codex/Gemeinde/: Gemeinde GemeindeByPlz"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/studiengang/Studiengang", array("studiengang_kz" => 1)); +$I->sendGET("v1/codex/Gemeinde/Gemeinde", array("gemeinde_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/organisation/studiengang/AllForBewerbung"); +$I->sendGET("v1/codex/Gemeinde/GemeindeByPlz", array("plz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/HauptberufCept.php b/tests/codeception/tests/api/v1/CodexHauptberufCept.php similarity index 77% rename from tests/codeception/tests/api/v1/HauptberufCept.php rename to tests/codeception/tests/api/v1/CodexHauptberufCept.php index 5d4954efd..b5518173b 100644 --- a/tests/codeception/tests/api/v1/HauptberufCept.php +++ b/tests/codeception/tests/api/v1/CodexHauptberufCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Hauptberuf/Hauptberuf"); +$I->wantTo("Test API call v1/codex/Hauptberuf/: Hauptberuf"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Hauptberuf/Hauptberuf", array("hauptberufcode" => "0")); +$I->sendGET("v1/codex/Hauptberuf/Hauptberuf", array("hauptberufcode" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LehrformCept.php b/tests/codeception/tests/api/v1/CodexLehrformCept.php similarity index 78% rename from tests/codeception/tests/api/v1/LehrformCept.php rename to tests/codeception/tests/api/v1/CodexLehrformCept.php index dfe3feaa0..7f2d9027a 100644 --- a/tests/codeception/tests/api/v1/LehrformCept.php +++ b/tests/codeception/tests/api/v1/CodexLehrformCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Lehrform/Lehrform"); +$I->wantTo("Test API call v1/codex/Lehrform/: Lehrform"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Lehrform/Lehrform", array("lehrform_kurzbz" => "0")); +$I->sendGET("v1/codex/Lehrform/Lehrform", array("lehrform_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LgartcodeCept.php b/tests/codeception/tests/api/v1/CodexLgartcodeCept.php similarity index 79% rename from tests/codeception/tests/api/v1/LgartcodeCept.php rename to tests/codeception/tests/api/v1/CodexLgartcodeCept.php index 4c53efef9..90725028b 100644 --- a/tests/codeception/tests/api/v1/LgartcodeCept.php +++ b/tests/codeception/tests/api/v1/CodexLgartcodeCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Lgartcode/Lgartcode"); +$I->wantTo("Test API call v1/codex/Lgartcode/: Lgartcode"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Lgartcode/Lgartcode", array("lgartcode" => "0")); +$I->sendGET("v1/codex/Lgartcode/Lgartcode", array("lgartcode" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/MobilitaetsprogrammCept.php b/tests/codeception/tests/api/v1/CodexMobilitaetsprogrammCept.php similarity index 69% rename from tests/codeception/tests/api/v1/MobilitaetsprogrammCept.php rename to tests/codeception/tests/api/v1/CodexMobilitaetsprogrammCept.php index 5e8f57852..5a365b3b9 100644 --- a/tests/codeception/tests/api/v1/MobilitaetsprogrammCept.php +++ b/tests/codeception/tests/api/v1/CodexMobilitaetsprogrammCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Mobilitaetsprogramm/Mobilitaetsprogramm"); +$I->wantTo("Test API call v1/codex/Mobilitaetsprogramm/: Mobilitaetsprogramm"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Mobilitaetsprogramm/Mobilitaetsprogramm", array("mobilitaetsprogramm_code" => "0")); +$I->sendGET("v1/codex/Mobilitaetsprogramm/Mobilitaetsprogramm", array("mobilitaetsprogramm_code" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PrestudentCept.php b/tests/codeception/tests/api/v1/CodexNationCept.php similarity index 58% rename from tests/codeception/tests/api/v1/PrestudentCept.php rename to tests/codeception/tests/api/v1/CodexNationCept.php index b9d505ce0..6574293bd 100644 --- a/tests/codeception/tests/api/v1/PrestudentCept.php +++ b/tests/codeception/tests/api/v1/CodexNationCept.php @@ -1,18 +1,16 @@ wantTo("Test API call v1/crm/prestudent Prestudent and PrestudentByPersonID"); +$I->wantTo("Test API call v1/codex/Nation/: Nation All"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/prestudent/Prestudent", array("prestudent_id" => 1)); +$I->sendGET("v1/codex/Nation/Nation", array("nation_code" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/crm/prestudent/PrestudentByPersonID", array("person_id" => 3)); +$I->sendGET("v1/codex/Nation/All", array("orderEnglish" => "1", "ohnesperre" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LogCept.php b/tests/codeception/tests/api/v1/CodexNoteCept.php similarity index 67% rename from tests/codeception/tests/api/v1/LogCept.php rename to tests/codeception/tests/api/v1/CodexNoteCept.php index 4d557f160..606305103 100644 --- a/tests/codeception/tests/api/v1/LogCept.php +++ b/tests/codeception/tests/api/v1/CodexNoteCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Log/Log"); +$I->wantTo("Test API call v1/codex/Note/: Note"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Log/Log", array("log_id" => "0")); +$I->sendGET("v1/codex/Note/Note", array("note" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/OrgformCept.php b/tests/codeception/tests/api/v1/CodexOrgformCept.php similarity index 64% rename from tests/codeception/tests/api/v1/OrgformCept.php rename to tests/codeception/tests/api/v1/CodexOrgformCept.php index 58203f86b..4a54af7e8 100644 --- a/tests/codeception/tests/api/v1/OrgformCept.php +++ b/tests/codeception/tests/api/v1/CodexOrgformCept.php @@ -1,24 +1,21 @@ wantTo("Test API call v1/codex/orgform Orgform, OrgformLV and All"); +$I->wantTo("Test API call v1/codex/Orgform/: Orgform All OrgformLV"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/orgform/Orgform", array("orgform_kurzbz" => "VZ")); +$I->sendGET("v1/codex/Orgform/Orgform", array("orgform_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/codex/orgform/All"); +$I->sendGET("v1/codex/Orgform/All", array()); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/codex/orgform/OrgformLV"); +$I->sendGET("v1/codex/Orgform/OrgformLV", array()); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/VerwendungCept.php b/tests/codeception/tests/api/v1/CodexVerwendungCept.php similarity index 77% rename from tests/codeception/tests/api/v1/VerwendungCept.php rename to tests/codeception/tests/api/v1/CodexVerwendungCept.php index 0b7d57220..1756483ed 100644 --- a/tests/codeception/tests/api/v1/VerwendungCept.php +++ b/tests/codeception/tests/api/v1/CodexVerwendungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Verwendung/Verwendung"); +$I->wantTo("Test API call v1/codex/Verwendung/: Verwendung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Verwendung/Verwendung", array("verwendung_code" => "0")); +$I->sendGET("v1/codex/Verwendung/Verwendung", array("verwendung_code" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/NoteCept.php b/tests/codeception/tests/api/v1/CodexZgvCept.php similarity index 67% rename from tests/codeception/tests/api/v1/NoteCept.php rename to tests/codeception/tests/api/v1/CodexZgvCept.php index ab8cda69c..3778dd699 100644 --- a/tests/codeception/tests/api/v1/NoteCept.php +++ b/tests/codeception/tests/api/v1/CodexZgvCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Note/Note"); +$I->wantTo("Test API call v1/codex/Zgv/: Zgv"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Note/Note", array("note" => "0")); +$I->sendGET("v1/codex/Zgv/Zgv", array("zgv_code" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZgvdoktorCept.php b/tests/codeception/tests/api/v1/CodexZgvdoktorCept.php similarity index 78% rename from tests/codeception/tests/api/v1/ZgvdoktorCept.php rename to tests/codeception/tests/api/v1/CodexZgvdoktorCept.php index 6d8989207..d469dd289 100644 --- a/tests/codeception/tests/api/v1/ZgvdoktorCept.php +++ b/tests/codeception/tests/api/v1/CodexZgvdoktorCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Zgvdoktor/Zgvdoktor"); +$I->wantTo("Test API call v1/codex/Zgvdoktor/: Zgvdoktor"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Zgvdoktor/Zgvdoktor", array("zgvdoktor_code" => "0")); +$I->sendGET("v1/codex/Zgvdoktor/Zgvdoktor", array("zgvdoktor_code" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZgvgruppeCept.php b/tests/codeception/tests/api/v1/CodexZgvgruppeCept.php similarity index 78% rename from tests/codeception/tests/api/v1/ZgvgruppeCept.php rename to tests/codeception/tests/api/v1/CodexZgvgruppeCept.php index b8ea33134..a4c0be889 100644 --- a/tests/codeception/tests/api/v1/ZgvgruppeCept.php +++ b/tests/codeception/tests/api/v1/CodexZgvgruppeCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Zgvgruppe/Zgvgruppe"); +$I->wantTo("Test API call v1/codex/Zgvgruppe/: Zgvgruppe"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Zgvgruppe/Zgvgruppe", array("gruppe_kurzbz" => "0")); +$I->sendGET("v1/codex/Zgvgruppe/Zgvgruppe", array("gruppe_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZgvmasterCept.php b/tests/codeception/tests/api/v1/CodexZgvmasterCept.php similarity index 78% rename from tests/codeception/tests/api/v1/ZgvmasterCept.php rename to tests/codeception/tests/api/v1/CodexZgvmasterCept.php index 3a2c8a86f..960c20f42 100644 --- a/tests/codeception/tests/api/v1/ZgvmasterCept.php +++ b/tests/codeception/tests/api/v1/CodexZgvmasterCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Zgvmaster/Zgvmaster"); +$I->wantTo("Test API call v1/codex/Zgvmaster/: Zgvmaster"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Zgvmaster/Zgvmaster", array("zgvmas_code" => "0")); +$I->sendGET("v1/codex/Zgvmaster/Zgvmaster", array("zgvmas_code" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AmpelCept.php b/tests/codeception/tests/api/v1/CodexZweckCept.php similarity index 65% rename from tests/codeception/tests/api/v1/AmpelCept.php rename to tests/codeception/tests/api/v1/CodexZweckCept.php index 4b65c1d14..bb95cd200 100644 --- a/tests/codeception/tests/api/v1/AmpelCept.php +++ b/tests/codeception/tests/api/v1/CodexZweckCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/Ampel/Ampel"); +$I->wantTo("Test API call v1/codex/Zweck/: Zweck"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/Ampel/Ampel", array("ampel_id" => "0")); +$I->sendGET("v1/codex/Zweck/Zweck", array("zweck_code" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ArchivCept.php b/tests/codeception/tests/api/v1/ContentAmpelCept.php similarity index 65% rename from tests/codeception/tests/api/v1/ArchivCept.php rename to tests/codeception/tests/api/v1/ContentAmpelCept.php index d854e6cde..16497d423 100644 --- a/tests/codeception/tests/api/v1/ArchivCept.php +++ b/tests/codeception/tests/api/v1/ContentAmpelCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Archiv/Archiv"); +$I->wantTo("Test API call v1/content/Ampel/: Ampel"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Archiv/Archiv", array("archiv_id" => "0")); +$I->sendGET("v1/content/Ampel/Ampel", array("ampel_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ContentCept.php b/tests/codeception/tests/api/v1/ContentContentCept.php similarity index 79% rename from tests/codeception/tests/api/v1/ContentCept.php rename to tests/codeception/tests/api/v1/ContentContentCept.php index 0363f2be4..c5a2218a3 100644 --- a/tests/codeception/tests/api/v1/ContentCept.php +++ b/tests/codeception/tests/api/v1/ContentContentCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/Content/Content"); +$I->wantTo("Test API call v1/content/Content/: Content"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/Content/Content", array("content_id" => "0")); +$I->sendGET("v1/content/Content/Content", array("content_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ContentchildCept.php b/tests/codeception/tests/api/v1/ContentContentchildCept.php similarity index 75% rename from tests/codeception/tests/api/v1/ContentchildCept.php rename to tests/codeception/tests/api/v1/ContentContentchildCept.php index 0ed898703..d361f3b6c 100644 --- a/tests/codeception/tests/api/v1/ContentchildCept.php +++ b/tests/codeception/tests/api/v1/ContentContentchildCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/Contentchild/Contentchild"); +$I->wantTo("Test API call v1/content/Contentchild/: Contentchild"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/Contentchild/Contentchild", array("contentchild_id" => "0")); +$I->sendGET("v1/content/Contentchild/Contentchild", array("contentchild_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ContentgruppeCept.php b/tests/codeception/tests/api/v1/ContentContentgruppeCept.php similarity index 71% rename from tests/codeception/tests/api/v1/ContentgruppeCept.php rename to tests/codeception/tests/api/v1/ContentContentgruppeCept.php index f58960089..efc49918f 100644 --- a/tests/codeception/tests/api/v1/ContentgruppeCept.php +++ b/tests/codeception/tests/api/v1/ContentContentgruppeCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/Contentgruppe/Contentgruppe"); +$I->wantTo("Test API call v1/content/Contentgruppe/: Contentgruppe"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/Contentgruppe/Contentgruppe", array("gruppe_kurzbz" => "0", "content_id" => "0")); +$I->sendGET("v1/content/Contentgruppe/Contentgruppe", array("gruppe_kurzbz" => "1", "content_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ContentlogCept.php b/tests/codeception/tests/api/v1/ContentContentlogCept.php similarity index 76% rename from tests/codeception/tests/api/v1/ContentlogCept.php rename to tests/codeception/tests/api/v1/ContentContentlogCept.php index ba25ac2fe..91dbf8303 100644 --- a/tests/codeception/tests/api/v1/ContentlogCept.php +++ b/tests/codeception/tests/api/v1/ContentContentlogCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/Contentlog/Contentlog"); +$I->wantTo("Test API call v1/content/Contentlog/: Contentlog"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/Contentlog/Contentlog", array("contentlog_id" => "0")); +$I->sendGET("v1/content/Contentlog/Contentlog", array("contentlog_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ContentspracheCept.php b/tests/codeception/tests/api/v1/ContentContentspracheCept.php similarity index 73% rename from tests/codeception/tests/api/v1/ContentspracheCept.php rename to tests/codeception/tests/api/v1/ContentContentspracheCept.php index bd07661f2..1f6d44e44 100644 --- a/tests/codeception/tests/api/v1/ContentspracheCept.php +++ b/tests/codeception/tests/api/v1/ContentContentspracheCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/Contentsprache/Contentsprache"); +$I->wantTo("Test API call v1/content/Contentsprache/: Contentsprache"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/Contentsprache/Contentsprache", array("contentsprache_id" => "0")); +$I->sendGET("v1/content/Contentsprache/Contentsprache", array("contentsprache_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ContentDmsCept.php b/tests/codeception/tests/api/v1/ContentDmsCept.php new file mode 100644 index 000000000..4535ef200 --- /dev/null +++ b/tests/codeception/tests/api/v1/ContentDmsCept.php @@ -0,0 +1,11 @@ +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", "version" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/InfoscreenCept.php b/tests/codeception/tests/api/v1/ContentInfoscreenCept.php similarity index 76% rename from tests/codeception/tests/api/v1/InfoscreenCept.php rename to tests/codeception/tests/api/v1/ContentInfoscreenCept.php index 07d6645c6..95dc9d266 100644 --- a/tests/codeception/tests/api/v1/InfoscreenCept.php +++ b/tests/codeception/tests/api/v1/ContentInfoscreenCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/Infoscreen/Infoscreen"); +$I->wantTo("Test API call v1/content/Infoscreen/: Infoscreen"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/Infoscreen/Infoscreen", array("infoscreen_id" => "0")); +$I->sendGET("v1/content/Infoscreen/Infoscreen", array("infoscreen_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/KontoCept.php b/tests/codeception/tests/api/v1/ContentNewsCept.php similarity index 65% rename from tests/codeception/tests/api/v1/KontoCept.php rename to tests/codeception/tests/api/v1/ContentNewsCept.php index d4ccdbbe4..91192caf9 100644 --- a/tests/codeception/tests/api/v1/KontoCept.php +++ b/tests/codeception/tests/api/v1/ContentNewsCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Konto/Konto"); +$I->wantTo("Test API call v1/content/News/: News"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Konto/Konto", array("buchungsnr" => "0")); +$I->sendGET("v1/content/News/News", array("news_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/TemplateCept.php b/tests/codeception/tests/api/v1/ContentTemplateCept.php similarity index 78% rename from tests/codeception/tests/api/v1/TemplateCept.php rename to tests/codeception/tests/api/v1/ContentTemplateCept.php index 0c18ec013..a49b9ca30 100644 --- a/tests/codeception/tests/api/v1/TemplateCept.php +++ b/tests/codeception/tests/api/v1/ContentTemplateCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/Template/Template"); +$I->wantTo("Test API call v1/content/Template/: Template"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/Template/Template", array("template_kurzbz" => "0")); +$I->sendGET("v1/content/Template/Template", array("template_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/VeranstaltungCept.php b/tests/codeception/tests/api/v1/ContentVeranstaltungCept.php similarity index 74% rename from tests/codeception/tests/api/v1/VeranstaltungCept.php rename to tests/codeception/tests/api/v1/ContentVeranstaltungCept.php index 4cfd95aa7..bf30ec638 100644 --- a/tests/codeception/tests/api/v1/VeranstaltungCept.php +++ b/tests/codeception/tests/api/v1/ContentVeranstaltungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/Veranstaltung/Veranstaltung"); +$I->wantTo("Test API call v1/content/Veranstaltung/: Veranstaltung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/Veranstaltung/Veranstaltung", array("veranstaltung_id" => "0")); +$I->sendGET("v1/content/Veranstaltung/Veranstaltung", array("veranstaltung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/VeranstaltungskategorieCept.php b/tests/codeception/tests/api/v1/ContentVeranstaltungskategorieCept.php similarity index 65% rename from tests/codeception/tests/api/v1/VeranstaltungskategorieCept.php rename to tests/codeception/tests/api/v1/ContentVeranstaltungskategorieCept.php index 206411d36..9c778281f 100644 --- a/tests/codeception/tests/api/v1/VeranstaltungskategorieCept.php +++ b/tests/codeception/tests/api/v1/ContentVeranstaltungskategorieCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/Veranstaltungskategorie/Veranstaltungskategorie"); +$I->wantTo("Test API call v1/content/Veranstaltungskategorie/: Veranstaltungskategorie"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/Veranstaltungskategorie/Veranstaltungskategorie", array("veranstaltungskategorie_kurzbz" => "0")); +$I->sendGET("v1/content/Veranstaltungskategorie/Veranstaltungskategorie", array("veranstaltungskategorie_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/MessageCept.php b/tests/codeception/tests/api/v1/CrmAkteCept.php similarity index 56% rename from tests/codeception/tests/api/v1/MessageCept.php rename to tests/codeception/tests/api/v1/CrmAkteCept.php index 5b195b431..99ef40c00 100644 --- a/tests/codeception/tests/api/v1/MessageCept.php +++ b/tests/codeception/tests/api/v1/CrmAkteCept.php @@ -1,24 +1,21 @@ wantTo("Test API call v1/system/message/MessagesByPersonID"); +$I->wantTo("Test API call v1/crm/Akte/: Akte Akten AktenAccepted"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/message/MessagesByPersonID", array("person_id" => "1")); +$I->sendGET("v1/crm/Akte/Akte", array("akte_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/system/message/MessagesByUID", array("uid" => "mckenzie")); +$I->sendGET("v1/crm/Akte/Akten", array("person_id" => "1", "dokument_kurzbz" => "1", "stg_kz" => "1", "prestudent_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/system/message/MessagesByToken", array("token" => "token")); +$I->sendGET("v1/crm/Akte/AktenAccepted", array("person_id" => "1", "dokument_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AufnahmeschluesselCept.php b/tests/codeception/tests/api/v1/CrmAufnahmeschluesselCept.php similarity index 71% rename from tests/codeception/tests/api/v1/AufnahmeschluesselCept.php rename to tests/codeception/tests/api/v1/CrmAufnahmeschluesselCept.php index 150249d6a..6d0e8b51e 100644 --- a/tests/codeception/tests/api/v1/AufnahmeschluesselCept.php +++ b/tests/codeception/tests/api/v1/CrmAufnahmeschluesselCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Aufnahmeschluessel/Aufnahmeschluessel"); +$I->wantTo("Test API call v1/crm/Aufnahmeschluessel/: Aufnahmeschluessel"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Aufnahmeschluessel/Aufnahmeschluessel", array("aufnahmeschluessel" => "0")); +$I->sendGET("v1/crm/Aufnahmeschluessel/Aufnahmeschluessel", array("aufnahmeschluessel" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AufnahmeterminCept.php b/tests/codeception/tests/api/v1/CrmAufnahmeterminCept.php similarity index 74% rename from tests/codeception/tests/api/v1/AufnahmeterminCept.php rename to tests/codeception/tests/api/v1/CrmAufnahmeterminCept.php index f9d670a27..d3cb8ccc6 100644 --- a/tests/codeception/tests/api/v1/AufnahmeterminCept.php +++ b/tests/codeception/tests/api/v1/CrmAufnahmeterminCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Aufnahmetermin/Aufnahmetermin"); +$I->wantTo("Test API call v1/crm/Aufnahmetermin/: Aufnahmetermin"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Aufnahmetermin/Aufnahmetermin", array("aufnahmetermin_id" => "0")); +$I->sendGET("v1/crm/Aufnahmetermin/Aufnahmetermin", array("aufnahmetermin_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AufnahmetermintypCept.php b/tests/codeception/tests/api/v1/CrmAufnahmetermintypCept.php similarity index 71% rename from tests/codeception/tests/api/v1/AufnahmetermintypCept.php rename to tests/codeception/tests/api/v1/CrmAufnahmetermintypCept.php index 5e2cf83ee..9c2b41388 100644 --- a/tests/codeception/tests/api/v1/AufnahmetermintypCept.php +++ b/tests/codeception/tests/api/v1/CrmAufnahmetermintypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Aufnahmetermintyp/Aufnahmetermintyp"); +$I->wantTo("Test API call v1/crm/Aufnahmetermintyp/: Aufnahmetermintyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Aufnahmetermintyp/Aufnahmetermintyp", array("aufnahmetermintyp_kurzbz" => "0")); +$I->sendGET("v1/crm/Aufnahmetermintyp/Aufnahmetermintyp", array("aufnahmetermintyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/CrmBewerbungstermineCept.php b/tests/codeception/tests/api/v1/CrmBewerbungstermineCept.php new file mode 100644 index 000000000..bf035c487 --- /dev/null +++ b/tests/codeception/tests/api/v1/CrmBewerbungstermineCept.php @@ -0,0 +1,26 @@ +wantTo("Test API call v1/crm/Bewerbungstermine/: Bewerbungstermine ByStudiengangStudiensemester ByStudienplan Current"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/crm/Bewerbungstermine/Bewerbungstermine", array("bewerbungstermine_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/crm/Bewerbungstermine/ByStudiengangStudiensemester", array("studiengang_kz" => "1", "studiensemester_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/crm/Bewerbungstermine/ByStudienplan", array("studienplan_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/crm/Bewerbungstermine/Current", array()); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BuchungstypCept.php b/tests/codeception/tests/api/v1/CrmBuchungstypCept.php similarity index 76% rename from tests/codeception/tests/api/v1/BuchungstypCept.php rename to tests/codeception/tests/api/v1/CrmBuchungstypCept.php index cc70dee1b..fb27fe004 100644 --- a/tests/codeception/tests/api/v1/BuchungstypCept.php +++ b/tests/codeception/tests/api/v1/CrmBuchungstypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Buchungstyp/Buchungstyp"); +$I->wantTo("Test API call v1/crm/Buchungstyp/: Buchungstyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Buchungstyp/Buchungstyp", array("buchungstyp_kurzbz" => "0")); +$I->sendGET("v1/crm/Buchungstyp/Buchungstyp", array("buchungstyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/DokumentCept.php b/tests/codeception/tests/api/v1/CrmDokumentCept.php similarity index 79% rename from tests/codeception/tests/api/v1/DokumentCept.php rename to tests/codeception/tests/api/v1/CrmDokumentCept.php index c9195ab3b..63eea778e 100644 --- a/tests/codeception/tests/api/v1/DokumentCept.php +++ b/tests/codeception/tests/api/v1/CrmDokumentCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Dokument/Dokument"); +$I->wantTo("Test API call v1/crm/Dokument/: Dokument"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Dokument/Dokument", array("dokument_kurzbz" => "0")); +$I->sendGET("v1/crm/Dokument/Dokument", array("dokument_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/DokumentprestudentCept.php b/tests/codeception/tests/api/v1/CrmDokumentprestudentCept.php similarity index 68% rename from tests/codeception/tests/api/v1/DokumentprestudentCept.php rename to tests/codeception/tests/api/v1/CrmDokumentprestudentCept.php index af7d0111b..8c2610852 100644 --- a/tests/codeception/tests/api/v1/DokumentprestudentCept.php +++ b/tests/codeception/tests/api/v1/CrmDokumentprestudentCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Dokumentprestudent/Dokumentprestudent"); +$I->wantTo("Test API call v1/crm/Dokumentprestudent/: Dokumentprestudent"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Dokumentprestudent/Dokumentprestudent", array("prestudent_id" => "0", "dokument_kurzbz" => "0")); +$I->sendGET("v1/crm/Dokumentprestudent/Dokumentprestudent", array("prestudent_id" => "1", "dokument_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/CrmDokumentstudiengangCept.php b/tests/codeception/tests/api/v1/CrmDokumentstudiengangCept.php new file mode 100644 index 000000000..bd968b7d8 --- /dev/null +++ b/tests/codeception/tests/api/v1/CrmDokumentstudiengangCept.php @@ -0,0 +1,16 @@ +wantTo("Test API call v1/crm/Dokumentstudiengang/: Dokumentstudiengang DokumentstudiengangByStudiengang_kz"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/crm/Dokumentstudiengang/Dokumentstudiengang", array("studiengang_kz" => "1", "dokument_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/crm/Dokumentstudiengang/DokumentstudiengangByStudiengang_kz", array("studiengang_kz" => "1", "onlinebewerbung" => "1", "pflicht" => "1", "nachreichbar" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BisioCept.php b/tests/codeception/tests/api/v1/CrmKontoCept.php similarity index 66% rename from tests/codeception/tests/api/v1/BisioCept.php rename to tests/codeception/tests/api/v1/CrmKontoCept.php index 0ce2a835a..1d683a358 100644 --- a/tests/codeception/tests/api/v1/BisioCept.php +++ b/tests/codeception/tests/api/v1/CrmKontoCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/Bisio/Bisio"); +$I->wantTo("Test API call v1/crm/Konto/: Konto"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Bisio/Bisio", array("bisio_id" => "0")); +$I->sendGET("v1/crm/Konto/Konto", array("buchungsnr" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PreincomingCept.php b/tests/codeception/tests/api/v1/CrmPreincomingCept.php similarity index 77% rename from tests/codeception/tests/api/v1/PreincomingCept.php rename to tests/codeception/tests/api/v1/CrmPreincomingCept.php index 680f6fb26..b567e66e9 100644 --- a/tests/codeception/tests/api/v1/PreincomingCept.php +++ b/tests/codeception/tests/api/v1/CrmPreincomingCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Preincoming/Preincoming"); +$I->wantTo("Test API call v1/crm/Preincoming/: Preincoming"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Preincoming/Preincoming", array("preincoming_id" => "0")); +$I->sendGET("v1/crm/Preincoming/Preincoming", array("preincoming_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PreinteressentCept.php b/tests/codeception/tests/api/v1/CrmPreinteressentCept.php similarity index 55% rename from tests/codeception/tests/api/v1/PreinteressentCept.php rename to tests/codeception/tests/api/v1/CrmPreinteressentCept.php index 259cd6c83..9c9903345 100644 --- a/tests/codeception/tests/api/v1/PreinteressentCept.php +++ b/tests/codeception/tests/api/v1/CrmPreinteressentCept.php @@ -1,18 +1,16 @@ wantTo("Test API call v1/crm/preinteressent Preinteressent and PreinteressentByPersonID"); +$I->wantTo("Test API call v1/crm/Preinteressent/: Preinteressent PreinteressentByPersonID"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/preinteressent/Preinteressent", array("preinteressent_id" => 1)); +$I->sendGET("v1/crm/Preinteressent/Preinteressent", array("preinteressent_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/crm/preinteressent/PreinteressentByPersonID", array("person_id" => 3)); +$I->sendGET("v1/crm/Preinteressent/PreinteressentByPersonID", array("person_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PreinteressentstudiengangCept.php b/tests/codeception/tests/api/v1/CrmPreinteressentstudiengangCept.php similarity index 63% rename from tests/codeception/tests/api/v1/PreinteressentstudiengangCept.php rename to tests/codeception/tests/api/v1/CrmPreinteressentstudiengangCept.php index a906ea5d1..5288c69cc 100644 --- a/tests/codeception/tests/api/v1/PreinteressentstudiengangCept.php +++ b/tests/codeception/tests/api/v1/CrmPreinteressentstudiengangCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Preinteressentstudiengang/Preinteressentstudiengang"); +$I->wantTo("Test API call v1/crm/Preinteressentstudiengang/: Preinteressentstudiengang"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Preinteressentstudiengang/Preinteressentstudiengang", array("preinteressent_id" => "0", "studiengang_kz" => "0")); +$I->sendGET("v1/crm/Preinteressentstudiengang/Preinteressentstudiengang", array("preinteressent_id" => "1", "studiengang_kz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PreoutgoingCept.php b/tests/codeception/tests/api/v1/CrmPreoutgoingCept.php similarity index 77% rename from tests/codeception/tests/api/v1/PreoutgoingCept.php rename to tests/codeception/tests/api/v1/CrmPreoutgoingCept.php index d40d17bd6..1598f26ea 100644 --- a/tests/codeception/tests/api/v1/PreoutgoingCept.php +++ b/tests/codeception/tests/api/v1/CrmPreoutgoingCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Preoutgoing/Preoutgoing"); +$I->wantTo("Test API call v1/crm/Preoutgoing/: Preoutgoing"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Preoutgoing/Preoutgoing", array("preoutgoing_id" => "0")); +$I->sendGET("v1/crm/Preoutgoing/Preoutgoing", array("preoutgoing_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/KontactCept.php b/tests/codeception/tests/api/v1/CrmPrestudentCept.php similarity index 55% rename from tests/codeception/tests/api/v1/KontactCept.php rename to tests/codeception/tests/api/v1/CrmPrestudentCept.php index 3b3291b99..820126e9f 100644 --- a/tests/codeception/tests/api/v1/KontactCept.php +++ b/tests/codeception/tests/api/v1/CrmPrestudentCept.php @@ -1,24 +1,21 @@ wantTo("Test API call v1/person/kontakt/ kontakt, KontaktByPersonID and KontaktByPersonIDKontaktTyp"); +$I->wantTo("Test API call v1/crm/Prestudent/: Prestudent PrestudentByPersonID Specialization"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/kontakt/kontakt", array("kontakt_id" => 1)); +$I->sendGET("v1/crm/Prestudent/Prestudent", array("prestudent_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/person/kontakt/KontaktByPersonID", array("person_id" => 3)); +$I->sendGET("v1/crm/Prestudent/PrestudentByPersonID", array("person_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/person/kontakt/KontaktByPersonIDKontaktTyp", array("person_id" => 3, "kontakttyp" => "email")); +$I->sendGET("v1/crm/Prestudent/Specialization", array("prestudent_id" => "1", "titel" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PrestudentstatusCept.php b/tests/codeception/tests/api/v1/CrmPrestudentstatusCept.php similarity index 63% rename from tests/codeception/tests/api/v1/PrestudentstatusCept.php rename to tests/codeception/tests/api/v1/CrmPrestudentstatusCept.php index de3735c38..de348903b 100644 --- a/tests/codeception/tests/api/v1/PrestudentstatusCept.php +++ b/tests/codeception/tests/api/v1/CrmPrestudentstatusCept.php @@ -1,18 +1,16 @@ wantTo("Test API call v1/crm/Prestudentstatus/Prestudentstatus"); +$I->wantTo("Test API call v1/crm/Prestudentstatus/: Prestudentstatus LastStatus"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Prestudentstatus/Prestudentstatus", array("ausbildungssemester" => "0", "studiensemester_kurzbz" => "0", "status_kurzbz" => "0", "prestudent_id" => "0")); +$I->sendGET("v1/crm/Prestudentstatus/Prestudentstatus", array("ausbildungssemester" => "1", "studiensemester_kurzbz" => "1", "status_kurzbz" => "1", "prestudent_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/crm/Prestudentstatus/LastStatus", array("prestudent_id" => 3)); +$I->sendGET("v1/crm/Prestudentstatus/LastStatus", array("prestudent_id" => "1", "studiensemester_kurzbz" => "1", "status_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/CrmReihungstestCept.php b/tests/codeception/tests/api/v1/CrmReihungstestCept.php new file mode 100644 index 000000000..94cd48628 --- /dev/null +++ b/tests/codeception/tests/api/v1/CrmReihungstestCept.php @@ -0,0 +1,21 @@ +wantTo("Test API call v1/crm/Reihungstest/: Reihungstest ByStudiengangStudiensemester ReihungstestByPersonID"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/crm/Reihungstest/Reihungstest", array("reihungstest_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/crm/Reihungstest/ByStudiengangStudiensemester", array("studiengang_kz" => "1", "studiensemester_kurzbz" => "1", "available" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/crm/Reihungstest/ReihungstestByPersonID", array("person_id" => "1", "available" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/RtPersonCept.php b/tests/codeception/tests/api/v1/CrmRtPersonCept.php similarity index 80% rename from tests/codeception/tests/api/v1/RtPersonCept.php rename to tests/codeception/tests/api/v1/CrmRtPersonCept.php index 356be6c25..70e5f460c 100644 --- a/tests/codeception/tests/api/v1/RtPersonCept.php +++ b/tests/codeception/tests/api/v1/CrmRtPersonCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/RtPerson/RtPerson"); +$I->wantTo("Test API call v1/crm/RtPerson/: RtPerson"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/RtPerson/RtPerson", array("rt_person_id" => "0")); +$I->sendGET("v1/crm/RtPerson/RtPerson", array("rt_person_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/RolleCept.php b/tests/codeception/tests/api/v1/CrmStatusCept.php similarity index 65% rename from tests/codeception/tests/api/v1/RolleCept.php rename to tests/codeception/tests/api/v1/CrmStatusCept.php index 2d4b65f1a..653841f8b 100644 --- a/tests/codeception/tests/api/v1/RolleCept.php +++ b/tests/codeception/tests/api/v1/CrmStatusCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Rolle/Rolle"); +$I->wantTo("Test API call v1/crm/Status/: Status"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Rolle/Rolle", array("rolle_kurzbz" => "0")); +$I->sendGET("v1/crm/Status/Status", array("status_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StatusgrundCept.php b/tests/codeception/tests/api/v1/CrmStatusgrundCept.php similarity index 76% rename from tests/codeception/tests/api/v1/StatusgrundCept.php rename to tests/codeception/tests/api/v1/CrmStatusgrundCept.php index 34afdd47e..250d195ba 100644 --- a/tests/codeception/tests/api/v1/StatusgrundCept.php +++ b/tests/codeception/tests/api/v1/CrmStatusgrundCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Statusgrund/Statusgrund"); +$I->wantTo("Test API call v1/crm/Statusgrund/: Statusgrund"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Statusgrund/Statusgrund", array("statusgrund_kurzbz" => "0")); +$I->sendGET("v1/crm/Statusgrund/Statusgrund", array("statusgrund_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/FilterCept.php b/tests/codeception/tests/api/v1/CrmStudentCept.php similarity index 65% rename from tests/codeception/tests/api/v1/FilterCept.php rename to tests/codeception/tests/api/v1/CrmStudentCept.php index 89239f32d..6d926e9dd 100644 --- a/tests/codeception/tests/api/v1/FilterCept.php +++ b/tests/codeception/tests/api/v1/CrmStudentCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Filter/Filter"); +$I->wantTo("Test API call v1/crm/Student/: Student"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Filter/Filter", array("filter_id" => "0")); +$I->sendGET("v1/crm/Student/Student", array("student_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/DigestLogin.php b/tests/codeception/tests/api/v1/DigestLogin.php deleted file mode 100644 index 2616f9e12..000000000 --- a/tests/codeception/tests/api/v1/DigestLogin.php +++ /dev/null @@ -1,18 +0,0 @@ -wantTo('Test the HTTP digest autentication when calling an API'); -$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org'); -$I->sendGET('v1/Test/test'); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson([ - 'success' => true, - 'message' => 'API HTTP GET call test succeed']); - -$I->sendPOST('v1/Test/test'); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson([ - 'success' => true, - 'message' => 'API HTTP POST call test succeed']); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/DokumentstudiengangCept.php b/tests/codeception/tests/api/v1/DokumentstudiengangCept.php deleted file mode 100644 index b04230e50..000000000 --- a/tests/codeception/tests/api/v1/DokumentstudiengangCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/crm/Dokumentstudiengang/Dokumentstudiengang"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Dokumentstudiengang/Dokumentstudiengang", array("studiengang_kz" => "0", "dokument_kurzbz" => "0", "studiengang_kz" => "0", "onlinebewerbung" => "0", "pflicht" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/EducationAbgabeCept.php b/tests/codeception/tests/api/v1/EducationAbgabeCept.php new file mode 100644 index 000000000..d1db9f7ff --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationAbgabeCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Abgabe/: Abgabe"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Abgabe/Abgabe", array("abgabe_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationAbschlussbeurteilungCept.php b/tests/codeception/tests/api/v1/EducationAbschlussbeurteilungCept.php new file mode 100644 index 000000000..53f51ff0e --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationAbschlussbeurteilungCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Abschlussbeurteilung/: Abschlussbeurteilung"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Abschlussbeurteilung/Abschlussbeurteilung", array("abschlussbeurteilung_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AbschlusspruefungCept.php b/tests/codeception/tests/api/v1/EducationAbschlusspruefungCept.php similarity index 55% rename from tests/codeception/tests/api/v1/AbschlusspruefungCept.php rename to tests/codeception/tests/api/v1/EducationAbschlusspruefungCept.php index 638d83207..e91ca11f7 100644 --- a/tests/codeception/tests/api/v1/AbschlusspruefungCept.php +++ b/tests/codeception/tests/api/v1/EducationAbschlusspruefungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/abschlusspruefung/Abschlusspruefung"); +$I->wantTo("Test API call v1/education/Abschlusspruefung/: Abschlusspruefung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/abschlusspruefung/Abschlusspruefung", array("abschlusspruefung_id" => "0")); +$I->sendGET("v1/education/Abschlusspruefung/Abschlusspruefung", array("abschlusspruefung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AnwesenheitCept.php b/tests/codeception/tests/api/v1/EducationAnrechnungCept.php similarity index 60% rename from tests/codeception/tests/api/v1/AnwesenheitCept.php rename to tests/codeception/tests/api/v1/EducationAnrechnungCept.php index c5e21c17f..3c17a80bb 100644 --- a/tests/codeception/tests/api/v1/AnwesenheitCept.php +++ b/tests/codeception/tests/api/v1/EducationAnrechnungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/anwesenheit/Anwesenheit"); +$I->wantTo("Test API call v1/education/Anrechnung/: Anrechnung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/anwesenheit/Anwesenheit", array("anwesenheit_id" => "0")); +$I->sendGET("v1/education/Anrechnung/Anrechnung", array("anrechnung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationAnwesenheitCept.php b/tests/codeception/tests/api/v1/EducationAnwesenheitCept.php new file mode 100644 index 000000000..c17db9a94 --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationAnwesenheitCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Anwesenheit/: Anwesenheit"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Anwesenheit/Anwesenheit", array("anwesenheit_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationBeispielCept.php b/tests/codeception/tests/api/v1/EducationBeispielCept.php new file mode 100644 index 000000000..ca81647a8 --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationBeispielCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Beispiel/: Beispiel"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Beispiel/Beispiel", array("beispiel_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LehrfunktionCept.php b/tests/codeception/tests/api/v1/EducationBetreuerartCept.php similarity index 59% rename from tests/codeception/tests/api/v1/LehrfunktionCept.php rename to tests/codeception/tests/api/v1/EducationBetreuerartCept.php index cf7c9ab34..118e9bb21 100644 --- a/tests/codeception/tests/api/v1/LehrfunktionCept.php +++ b/tests/codeception/tests/api/v1/EducationBetreuerartCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/lehrfunktion/Lehrfunktion"); +$I->wantTo("Test API call v1/education/Betreuerart/: Betreuerart"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/lehrfunktion/Lehrfunktion", array("lehrfunktion_kurzbz" => "0")); +$I->sendGET("v1/education/Betreuerart/Betreuerart", array("betreuerart_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationFeedbackCept.php b/tests/codeception/tests/api/v1/EducationFeedbackCept.php new file mode 100644 index 000000000..05cdafaa2 --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationFeedbackCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Feedback/: Feedback"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Feedback/Feedback", array("feedback_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationLegesamtnoteCept.php b/tests/codeception/tests/api/v1/EducationLegesamtnoteCept.php new file mode 100644 index 000000000..365cb7890 --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationLegesamtnoteCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Legesamtnote/: Legesamtnote"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Legesamtnote/Legesamtnote", array("lehreinheit_id" => "1", "student_uid" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationLehreinheitCept.php b/tests/codeception/tests/api/v1/EducationLehreinheitCept.php new file mode 100644 index 000000000..3a151bde6 --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationLehreinheitCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Lehreinheit/: Lehreinheit"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Lehreinheit/Lehreinheit", array("lehreinheit_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationLehreinheitgruppeCept.php b/tests/codeception/tests/api/v1/EducationLehreinheitgruppeCept.php new file mode 100644 index 000000000..ee8f1561a --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationLehreinheitgruppeCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Lehreinheitgruppe/: Lehreinheitgruppe"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Lehreinheitgruppe/Lehreinheitgruppe", array("lehreinheitgruppe_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LehreinheitmitarbeiterCept.php b/tests/codeception/tests/api/v1/EducationLehreinheitmitarbeiterCept.php similarity index 65% rename from tests/codeception/tests/api/v1/LehreinheitmitarbeiterCept.php rename to tests/codeception/tests/api/v1/EducationLehreinheitmitarbeiterCept.php index 6d24ade12..a4c4968d6 100644 --- a/tests/codeception/tests/api/v1/LehreinheitmitarbeiterCept.php +++ b/tests/codeception/tests/api/v1/EducationLehreinheitmitarbeiterCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/lehreinheitmitarbeiter/Lehreinheitmitarbeiter"); +$I->wantTo("Test API call v1/education/Lehreinheitmitarbeiter/: Lehreinheitmitarbeiter"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Lehreinheitmitarbeiter/Lehreinheitmitarbeiter", array("mitarbeiter_uid" => "0", "lehreinheit_id" => "0")); +$I->sendGET("v1/education/Lehreinheitmitarbeiter/Lehreinheitmitarbeiter", array("mitarbeiter_uid" => "1", "lehreinheit_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationLehrfachCept.php b/tests/codeception/tests/api/v1/EducationLehrfachCept.php new file mode 100644 index 000000000..cca7af642 --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationLehrfachCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Lehrfach/: Lehrfach"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Lehrfach/Lehrfach", array("lehrfach_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationLehrfunktionCept.php b/tests/codeception/tests/api/v1/EducationLehrfunktionCept.php new file mode 100644 index 000000000..55057c503 --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationLehrfunktionCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Lehrfunktion/: Lehrfunktion"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Lehrfunktion/Lehrfunktion", array("lehrfunktion_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationLehrtypCept.php b/tests/codeception/tests/api/v1/EducationLehrtypCept.php new file mode 100644 index 000000000..112c2329d --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationLehrtypCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Lehrtyp/: Lehrtyp"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Lehrtyp/Lehrtyp", array("lehrtyp_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationLehrveranstaltungCept.php b/tests/codeception/tests/api/v1/EducationLehrveranstaltungCept.php new file mode 100644 index 000000000..4737d2838 --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationLehrveranstaltungCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Lehrveranstaltung/: Lehrveranstaltung"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Lehrveranstaltung/Lehrveranstaltung", array("lehrveranstaltung_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationLenotenschluesselCept.php b/tests/codeception/tests/api/v1/EducationLenotenschluesselCept.php new file mode 100644 index 000000000..e0d63ba4d --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationLenotenschluesselCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Lenotenschluessel/: LeNotenschluessel"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Lenotenschluessel/LeNotenschluessel", array("note" => "1", "lehreinheit_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LehreinheitCept.php b/tests/codeception/tests/api/v1/EducationLepruefungCept.php similarity index 60% rename from tests/codeception/tests/api/v1/LehreinheitCept.php rename to tests/codeception/tests/api/v1/EducationLepruefungCept.php index d86b32189..c98e883b8 100644 --- a/tests/codeception/tests/api/v1/LehreinheitCept.php +++ b/tests/codeception/tests/api/v1/EducationLepruefungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/lehreinheit/Lehreinheit"); +$I->wantTo("Test API call v1/education/Lepruefung/: LePruefung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/lehreinheit/Lehreinheit", array("lehreinheit_id" => "0")); +$I->sendGET("v1/education/Lepruefung/LePruefung", array("lepruefung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationLvangebotCept.php b/tests/codeception/tests/api/v1/EducationLvangebotCept.php new file mode 100644 index 000000000..25c93a5a4 --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationLvangebotCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Lvangebot/: Lvangebot"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Lvangebot/Lvangebot", array("lvangebot_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LvgesamtnoteCept.php b/tests/codeception/tests/api/v1/EducationLvgesamtnoteCept.php similarity index 64% rename from tests/codeception/tests/api/v1/LvgesamtnoteCept.php rename to tests/codeception/tests/api/v1/EducationLvgesamtnoteCept.php index 27ef4b24e..258d1181a 100644 --- a/tests/codeception/tests/api/v1/LvgesamtnoteCept.php +++ b/tests/codeception/tests/api/v1/EducationLvgesamtnoteCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Lvgesamtnote/Lvgesamtnote"); +$I->wantTo("Test API call v1/education/Lvgesamtnote/: Lvgesamtnote"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Lvgesamtnote/Lvgesamtnote", array("student_uid" => "0", "studiensemester_kurzbz" => "0", "lehrveranstaltung_id" => "0")); +$I->sendGET("v1/education/Lvgesamtnote/Lvgesamtnote", array("student_uid" => "1", "studiensemester_kurzbz" => "1", "lehrveranstaltung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationLvinfoCept.php b/tests/codeception/tests/api/v1/EducationLvinfoCept.php new file mode 100644 index 000000000..e0a24e6ab --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationLvinfoCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Lvinfo/: Lvinfo"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Lvinfo/Lvinfo", array("sprache" => "1", "lehrveranstaltung_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LvregelCept.php b/tests/codeception/tests/api/v1/EducationLvregelCept.php similarity index 79% rename from tests/codeception/tests/api/v1/LvregelCept.php rename to tests/codeception/tests/api/v1/EducationLvregelCept.php index bee6f3f75..dabc2b233 100644 --- a/tests/codeception/tests/api/v1/LvregelCept.php +++ b/tests/codeception/tests/api/v1/EducationLvregelCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Lvregel/Lvregel"); +$I->wantTo("Test API call v1/education/Lvregel/: Lvregel"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Lvregel/Lvregel", array("lvregel_id" => "0")); +$I->sendGET("v1/education/Lvregel/Lvregel", array("lvregel_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LvregeltypCept.php b/tests/codeception/tests/api/v1/EducationLvregeltypCept.php similarity index 75% rename from tests/codeception/tests/api/v1/LvregeltypCept.php rename to tests/codeception/tests/api/v1/EducationLvregeltypCept.php index 764c6c185..2aabbbe7c 100644 --- a/tests/codeception/tests/api/v1/LvregeltypCept.php +++ b/tests/codeception/tests/api/v1/EducationLvregeltypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Lvregeltyp/Lvregeltyp"); +$I->wantTo("Test API call v1/education/Lvregeltyp/: Lvregeltyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Lvregeltyp/Lvregeltyp", array("lvregeltyp_kurzbz" => "0")); +$I->sendGET("v1/education/Lvregeltyp/Lvregeltyp", array("lvregeltyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/MoodleCept.php b/tests/codeception/tests/api/v1/EducationMoodleCept.php similarity index 80% rename from tests/codeception/tests/api/v1/MoodleCept.php rename to tests/codeception/tests/api/v1/EducationMoodleCept.php index 181bf7905..26ec9ddd7 100644 --- a/tests/codeception/tests/api/v1/MoodleCept.php +++ b/tests/codeception/tests/api/v1/EducationMoodleCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Moodle/Moodle"); +$I->wantTo("Test API call v1/education/Moodle/: Moodle"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Moodle/Moodle", array("moodle_id" => "0")); +$I->sendGET("v1/education/Moodle/Moodle", array("moodle_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/NotenschluesselCept.php b/tests/codeception/tests/api/v1/EducationNotenschluesselCept.php similarity index 71% rename from tests/codeception/tests/api/v1/NotenschluesselCept.php rename to tests/codeception/tests/api/v1/EducationNotenschluesselCept.php index f1f009f91..0e1743016 100644 --- a/tests/codeception/tests/api/v1/NotenschluesselCept.php +++ b/tests/codeception/tests/api/v1/EducationNotenschluesselCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Notenschluessel/Notenschluessel"); +$I->wantTo("Test API call v1/education/Notenschluessel/: Notenschluessel"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Notenschluessel/Notenschluessel", array("notenschluessel_kurzbz" => "0")); +$I->sendGET("v1/education/Notenschluessel/Notenschluessel", array("notenschluessel_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/NotenschluesselaufteilungCept.php b/tests/codeception/tests/api/v1/EducationNotenschluesselaufteilungCept.php similarity index 77% rename from tests/codeception/tests/api/v1/NotenschluesselaufteilungCept.php rename to tests/codeception/tests/api/v1/EducationNotenschluesselaufteilungCept.php index 35ea082c8..258197bc9 100644 --- a/tests/codeception/tests/api/v1/NotenschluesselaufteilungCept.php +++ b/tests/codeception/tests/api/v1/EducationNotenschluesselaufteilungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Notenschluesselaufteilung/Notenschluesselaufteilung"); +$I->wantTo("Test API call v1/education/Notenschluesselaufteilung/: Notenschluesselaufteilung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Notenschluesselaufteilung/Notenschluesselaufteilung", array("notenschluesselaufteilung_id" => "0")); +$I->sendGET("v1/education/Notenschluesselaufteilung/Notenschluesselaufteilung", array("notenschluesselaufteilung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/NotenschluesseluebungCept.php b/tests/codeception/tests/api/v1/EducationNotenschluesseluebungCept.php similarity index 67% rename from tests/codeception/tests/api/v1/NotenschluesseluebungCept.php rename to tests/codeception/tests/api/v1/EducationNotenschluesseluebungCept.php index 337b3a5c6..66184d90b 100644 --- a/tests/codeception/tests/api/v1/NotenschluesseluebungCept.php +++ b/tests/codeception/tests/api/v1/EducationNotenschluesseluebungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Notenschluesseluebung/Notenschluesseluebung"); +$I->wantTo("Test API call v1/education/Notenschluesseluebung/: Notenschluesseluebung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Notenschluesseluebung/Notenschluesseluebung", array("note" => "0", "uebung_id" => "0")); +$I->sendGET("v1/education/Notenschluesseluebung/Notenschluesseluebung", array("note" => "1", "uebung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/NotenschluesselzuordnungCept.php b/tests/codeception/tests/api/v1/EducationNotenschluesselzuordnungCept.php similarity index 78% rename from tests/codeception/tests/api/v1/NotenschluesselzuordnungCept.php rename to tests/codeception/tests/api/v1/EducationNotenschluesselzuordnungCept.php index 388b6e643..c5c32e385 100644 --- a/tests/codeception/tests/api/v1/NotenschluesselzuordnungCept.php +++ b/tests/codeception/tests/api/v1/EducationNotenschluesselzuordnungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Notenschluesselzuordnung/Notenschluesselzuordnung"); +$I->wantTo("Test API call v1/education/Notenschluesselzuordnung/: Notenschluesselzuordnung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Notenschluesselzuordnung/Notenschluesselzuordnung", array("notenschluesselzuordnung_id" => "0")); +$I->sendGET("v1/education/Notenschluesselzuordnung/Notenschluesselzuordnung", array("notenschluesselzuordnung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PaabgabeCept.php b/tests/codeception/tests/api/v1/EducationPaabgabeCept.php similarity index 78% rename from tests/codeception/tests/api/v1/PaabgabeCept.php rename to tests/codeception/tests/api/v1/EducationPaabgabeCept.php index eb93b2cb1..7269e75aa 100644 --- a/tests/codeception/tests/api/v1/PaabgabeCept.php +++ b/tests/codeception/tests/api/v1/EducationPaabgabeCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Paabgabe/Paabgabe"); +$I->wantTo("Test API call v1/education/Paabgabe/: Paabgabe"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Paabgabe/Paabgabe", array("paabgabe_id" => "0")); +$I->sendGET("v1/education/Paabgabe/Paabgabe", array("paabgabe_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PaabgabetypCept.php b/tests/codeception/tests/api/v1/EducationPaabgabetypCept.php similarity index 74% rename from tests/codeception/tests/api/v1/PaabgabetypCept.php rename to tests/codeception/tests/api/v1/EducationPaabgabetypCept.php index 0c5985364..b7849c689 100644 --- a/tests/codeception/tests/api/v1/PaabgabetypCept.php +++ b/tests/codeception/tests/api/v1/EducationPaabgabetypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Paabgabetyp/Paabgabetyp"); +$I->wantTo("Test API call v1/education/Paabgabetyp/: Paabgabetyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Paabgabetyp/Paabgabetyp", array("paabgabetyp_kurzbz" => "0")); +$I->sendGET("v1/education/Paabgabetyp/Paabgabetyp", array("paabgabetyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ProjektarbeitCept.php b/tests/codeception/tests/api/v1/EducationProjektarbeitCept.php similarity index 73% rename from tests/codeception/tests/api/v1/ProjektarbeitCept.php rename to tests/codeception/tests/api/v1/EducationProjektarbeitCept.php index acf43fe21..ce8719307 100644 --- a/tests/codeception/tests/api/v1/ProjektarbeitCept.php +++ b/tests/codeception/tests/api/v1/EducationProjektarbeitCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Projektarbeit/Projektarbeit"); +$I->wantTo("Test API call v1/education/Projektarbeit/: Projektarbeit"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Projektarbeit/Projektarbeit", array("projektarbeit_id" => "0")); +$I->sendGET("v1/education/Projektarbeit/Projektarbeit", array("projektarbeit_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ProjektbetreuerCept.php b/tests/codeception/tests/api/v1/EducationProjektbetreuerCept.php similarity index 64% rename from tests/codeception/tests/api/v1/ProjektbetreuerCept.php rename to tests/codeception/tests/api/v1/EducationProjektbetreuerCept.php index 6886120b0..4aaf71701 100644 --- a/tests/codeception/tests/api/v1/ProjektbetreuerCept.php +++ b/tests/codeception/tests/api/v1/EducationProjektbetreuerCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Projektbetreuer/Projektbetreuer"); +$I->wantTo("Test API call v1/education/Projektbetreuer/: Projektbetreuer"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Projektbetreuer/Projektbetreuer", array("betreuerart_kurzbz" => "0", "projektarbeit_id" => "0", "person_id" => "0")); +$I->sendGET("v1/education/Projektbetreuer/Projektbetreuer", array("betreuerart_kurzbz" => "1", "projektarbeit_id" => "1", "person_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ProjekttypCept.php b/tests/codeception/tests/api/v1/EducationProjekttypCept.php similarity index 75% rename from tests/codeception/tests/api/v1/ProjekttypCept.php rename to tests/codeception/tests/api/v1/EducationProjekttypCept.php index e0473d3f3..e75fbd83e 100644 --- a/tests/codeception/tests/api/v1/ProjekttypCept.php +++ b/tests/codeception/tests/api/v1/EducationProjekttypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Projekttyp/Projekttyp"); +$I->wantTo("Test API call v1/education/Projekttyp/: Projekttyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Projekttyp/Projekttyp", array("projekttyp_kurzbz" => "0")); +$I->sendGET("v1/education/Projekttyp/Projekttyp", array("projekttyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PruefungCept.php b/tests/codeception/tests/api/v1/EducationPruefungCept.php similarity index 78% rename from tests/codeception/tests/api/v1/PruefungCept.php rename to tests/codeception/tests/api/v1/EducationPruefungCept.php index 46475a1f8..5111b2f00 100644 --- a/tests/codeception/tests/api/v1/PruefungCept.php +++ b/tests/codeception/tests/api/v1/EducationPruefungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Pruefung/Pruefung"); +$I->wantTo("Test API call v1/education/Pruefung/: Pruefung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Pruefung/Pruefung", array("pruefung_id" => "0")); +$I->sendGET("v1/education/Pruefung/Pruefung", array("pruefung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PruefungsanmeldungCept.php b/tests/codeception/tests/api/v1/EducationPruefungsanmeldungCept.php similarity index 69% rename from tests/codeception/tests/api/v1/PruefungsanmeldungCept.php rename to tests/codeception/tests/api/v1/EducationPruefungsanmeldungCept.php index 8b7e9de3d..eb76707c8 100644 --- a/tests/codeception/tests/api/v1/PruefungsanmeldungCept.php +++ b/tests/codeception/tests/api/v1/EducationPruefungsanmeldungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Pruefungsanmeldung/Pruefungsanmeldung"); +$I->wantTo("Test API call v1/education/Pruefungsanmeldung/: Pruefungsanmeldung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Pruefungsanmeldung/Pruefungsanmeldung", array("pruefungsanmeldung_id" => "0")); +$I->sendGET("v1/education/Pruefungsanmeldung/Pruefungsanmeldung", array("pruefungsanmeldung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PruefungsfensterCept.php b/tests/codeception/tests/api/v1/EducationPruefungsfensterCept.php similarity index 70% rename from tests/codeception/tests/api/v1/PruefungsfensterCept.php rename to tests/codeception/tests/api/v1/EducationPruefungsfensterCept.php index 0bb5d7229..ed59f4a2b 100644 --- a/tests/codeception/tests/api/v1/PruefungsfensterCept.php +++ b/tests/codeception/tests/api/v1/EducationPruefungsfensterCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Pruefungsfenster/Pruefungsfenster"); +$I->wantTo("Test API call v1/education/Pruefungsfenster/: Pruefungsfenster"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Pruefungsfenster/Pruefungsfenster", array("pruefungsfenster_id" => "0")); +$I->sendGET("v1/education/Pruefungsfenster/Pruefungsfenster", array("pruefungsfenster_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/EducationPruefungsstatusCept.php b/tests/codeception/tests/api/v1/EducationPruefungsstatusCept.php new file mode 100644 index 000000000..74a9e2491 --- /dev/null +++ b/tests/codeception/tests/api/v1/EducationPruefungsstatusCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/education/Pruefungsstatus/: Pruefungsstatus"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/education/Pruefungsstatus/Pruefungsstatus", array("status_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PruefungsterminCept.php b/tests/codeception/tests/api/v1/EducationPruefungsterminCept.php similarity index 71% rename from tests/codeception/tests/api/v1/PruefungsterminCept.php rename to tests/codeception/tests/api/v1/EducationPruefungsterminCept.php index cf8f793af..96a9f4133 100644 --- a/tests/codeception/tests/api/v1/PruefungsterminCept.php +++ b/tests/codeception/tests/api/v1/EducationPruefungsterminCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Pruefungstermin/Pruefungstermin"); +$I->wantTo("Test API call v1/education/Pruefungstermin/: Pruefungstermin"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Pruefungstermin/Pruefungstermin", array("pruefungstermin_id" => "0")); +$I->sendGET("v1/education/Pruefungstermin/Pruefungstermin", array("pruefungstermin_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PruefungstypCept.php b/tests/codeception/tests/api/v1/EducationPruefungstypCept.php similarity index 73% rename from tests/codeception/tests/api/v1/PruefungstypCept.php rename to tests/codeception/tests/api/v1/EducationPruefungstypCept.php index 60b0f16e2..02d185e35 100644 --- a/tests/codeception/tests/api/v1/PruefungstypCept.php +++ b/tests/codeception/tests/api/v1/EducationPruefungstypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Pruefungstyp/Pruefungstyp"); +$I->wantTo("Test API call v1/education/Pruefungstyp/: Pruefungstyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Pruefungstyp/Pruefungstyp", array("pruefungstyp_kurzbz" => "0")); +$I->sendGET("v1/education/Pruefungstyp/Pruefungstyp", array("pruefungstyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StudentbeispielCept.php b/tests/codeception/tests/api/v1/EducationStudentbeispielCept.php similarity index 69% rename from tests/codeception/tests/api/v1/StudentbeispielCept.php rename to tests/codeception/tests/api/v1/EducationStudentbeispielCept.php index 6d774f17c..e409dd561 100644 --- a/tests/codeception/tests/api/v1/StudentbeispielCept.php +++ b/tests/codeception/tests/api/v1/EducationStudentbeispielCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Studentbeispiel/Studentbeispiel"); +$I->wantTo("Test API call v1/education/Studentbeispiel/: Studentbeispiel"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Studentbeispiel/Studentbeispiel", array("beispiel_id" => "0", "student_uid" => "0")); +$I->sendGET("v1/education/Studentbeispiel/Studentbeispiel", array("beispiel_id" => "1", "student_uid" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StudentlehrverbandCept.php b/tests/codeception/tests/api/v1/EducationStudentlehrverbandCept.php similarity index 66% rename from tests/codeception/tests/api/v1/StudentlehrverbandCept.php rename to tests/codeception/tests/api/v1/EducationStudentlehrverbandCept.php index 950701bc5..cf6724b29 100644 --- a/tests/codeception/tests/api/v1/StudentlehrverbandCept.php +++ b/tests/codeception/tests/api/v1/EducationStudentlehrverbandCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Studentlehrverband/Studentlehrverband"); +$I->wantTo("Test API call v1/education/Studentlehrverband/: Studentlehrverband"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Studentlehrverband/Studentlehrverband", array("studiensemester_kurzbz" => "0", "student_uid" => "0")); +$I->sendGET("v1/education/Studentlehrverband/Studentlehrverband", array("studiensemester_kurzbz" => "1", "student_uid" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StudentuebungCept.php b/tests/codeception/tests/api/v1/EducationStudentuebungCept.php similarity index 70% rename from tests/codeception/tests/api/v1/StudentuebungCept.php rename to tests/codeception/tests/api/v1/EducationStudentuebungCept.php index 08d8fd102..5ca032da3 100644 --- a/tests/codeception/tests/api/v1/StudentuebungCept.php +++ b/tests/codeception/tests/api/v1/EducationStudentuebungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Studentuebung/Studentuebung"); +$I->wantTo("Test API call v1/education/Studentuebung/: Studentuebung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Studentuebung/Studentuebung", array("uebung_id" => "0", "student_uid" => "0")); +$I->sendGET("v1/education/Studentuebung/Studentuebung", array("uebung_id" => "1", "student_uid" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/UebungCept.php b/tests/codeception/tests/api/v1/EducationUebungCept.php similarity index 80% rename from tests/codeception/tests/api/v1/UebungCept.php rename to tests/codeception/tests/api/v1/EducationUebungCept.php index 823d3cb12..4a538e52e 100644 --- a/tests/codeception/tests/api/v1/UebungCept.php +++ b/tests/codeception/tests/api/v1/EducationUebungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Uebung/Uebung"); +$I->wantTo("Test API call v1/education/Uebung/: Uebung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Uebung/Uebung", array("uebung_id" => "0")); +$I->sendGET("v1/education/Uebung/Uebung", array("uebung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZeugnisCept.php b/tests/codeception/tests/api/v1/EducationZeugnisCept.php similarity index 79% rename from tests/codeception/tests/api/v1/ZeugnisCept.php rename to tests/codeception/tests/api/v1/EducationZeugnisCept.php index ad7d38ba4..821221d4c 100644 --- a/tests/codeception/tests/api/v1/ZeugnisCept.php +++ b/tests/codeception/tests/api/v1/EducationZeugnisCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Zeugnis/Zeugnis"); +$I->wantTo("Test API call v1/education/Zeugnis/: Zeugnis"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Zeugnis/Zeugnis", array("zeugnis_id" => "0")); +$I->sendGET("v1/education/Zeugnis/Zeugnis", array("zeugnis_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZeugnisnoteCept.php b/tests/codeception/tests/api/v1/EducationZeugnisnoteCept.php similarity index 65% rename from tests/codeception/tests/api/v1/ZeugnisnoteCept.php rename to tests/codeception/tests/api/v1/EducationZeugnisnoteCept.php index 92ec630ff..5d203898e 100644 --- a/tests/codeception/tests/api/v1/ZeugnisnoteCept.php +++ b/tests/codeception/tests/api/v1/EducationZeugnisnoteCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/Zeugnisnote/Zeugnisnote"); +$I->wantTo("Test API call v1/education/Zeugnisnote/: Zeugnisnote"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Zeugnisnote/Zeugnisnote", array("studiensemester_kurzbz" => "0", "student_uid" => "0", "lehrveranstaltung_id" => "0")); +$I->sendGET("v1/education/Zeugnisnote/Zeugnisnote", array("studiensemester_kurzbz" => "1", "student_uid" => "1", "lehrveranstaltung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/FachbereichCept.php b/tests/codeception/tests/api/v1/FachbereichCept.php deleted file mode 100644 index a544fc585..000000000 --- a/tests/codeception/tests/api/v1/FachbereichCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/organisation/fachbereich/Fachbereich"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/fachbereich/Fachbereich", array("fachbereich_kurzbz" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/FeedbackCept.php b/tests/codeception/tests/api/v1/FeedbackCept.php deleted file mode 100644 index 7b070a5a1..000000000 --- a/tests/codeception/tests/api/v1/FeedbackCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/feedback/Feedback"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/feedback/Feedback", array("feedback_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/FirmatagCept.php b/tests/codeception/tests/api/v1/FirmatagCept.php deleted file mode 100644 index 45dcb375b..000000000 --- a/tests/codeception/tests/api/v1/FirmatagCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/ressource/Firmatag/Firmatag"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Firmatag/Firmatag", array("tag" => "0", "firma_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/GemeindeCept.php b/tests/codeception/tests/api/v1/GemeindeCept.php deleted file mode 100644 index e24d49f99..000000000 --- a/tests/codeception/tests/api/v1/GemeindeCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/codex/Gemeinde/Gemeinde"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Gemeinde/Gemeinde", array("gemeinde_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/Geschaeftsjahr2Cept.php b/tests/codeception/tests/api/v1/Geschaeftsjahr2Cept.php deleted file mode 100644 index 0506cd12a..000000000 --- a/tests/codeception/tests/api/v1/Geschaeftsjahr2Cept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/organisation/geschaeftsjahr/Geschaeftsjahr"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/geschaeftsjahr/Geschaeftsjahr", array("geschaeftsjahr_kurzbz" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/LegesamtnoteCept.php b/tests/codeception/tests/api/v1/LegesamtnoteCept.php deleted file mode 100644 index c74559099..000000000 --- a/tests/codeception/tests/api/v1/LegesamtnoteCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/legesamtnote/Legesamtnote"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/legesamtnote/Legesamtnote", array("lehreinheit_id" => "0", "student_uid" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/LehreinheitgruppeCept.php b/tests/codeception/tests/api/v1/LehreinheitgruppeCept.php deleted file mode 100644 index 22a7b25ff..000000000 --- a/tests/codeception/tests/api/v1/LehreinheitgruppeCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/lehreinheitgruppe/Lehreinheitgruppe"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/lehreinheitgruppe/Lehreinheitgruppe", array("lehreinheitgruppe_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/LehrfachCept.php b/tests/codeception/tests/api/v1/LehrfachCept.php deleted file mode 100644 index dd7ca7cf3..000000000 --- a/tests/codeception/tests/api/v1/LehrfachCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/lehrfach/Lehrfach"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/lehrfach/Lehrfach", array("lehrfach_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/LehrtypCept.php b/tests/codeception/tests/api/v1/LehrtypCept.php deleted file mode 100644 index 4d0ceb2d1..000000000 --- a/tests/codeception/tests/api/v1/LehrtypCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/lehrtyp/Lehrtyp"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/lehrtyp/Lehrtyp", array("lehrtyp_kurzbz" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/LehrveranstaltungCept.php b/tests/codeception/tests/api/v1/LehrveranstaltungCept.php deleted file mode 100644 index 7e95e8bc0..000000000 --- a/tests/codeception/tests/api/v1/LehrveranstaltungCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/lehrveranstaltung/Lehrveranstaltung"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/lehrveranstaltung/Lehrveranstaltung", array("lehrveranstaltung_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/LenotenschluesselCept.php b/tests/codeception/tests/api/v1/LenotenschluesselCept.php deleted file mode 100644 index ee3c17953..000000000 --- a/tests/codeception/tests/api/v1/LenotenschluesselCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/lenotenschluessel/LeNotenschluessel"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/lenotenschluessel/LeNotenschluessel", array("note" => "0", "lehreinheit_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/LepruefungCept.php b/tests/codeception/tests/api/v1/LepruefungCept.php deleted file mode 100644 index 434fbc918..000000000 --- a/tests/codeception/tests/api/v1/LepruefungCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/lepruefung/LePruefung"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/lepruefung/LePruefung", array("lepruefung_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/LvangebotCept.php b/tests/codeception/tests/api/v1/LvangebotCept.php deleted file mode 100644 index 6c27633f9..000000000 --- a/tests/codeception/tests/api/v1/LvangebotCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/lvangebot/Lvangebot"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/lvangebot/Lvangebot", array("lvangebot_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/LvinfoCept.php b/tests/codeception/tests/api/v1/LvinfoCept.php deleted file mode 100644 index 9edc89c99..000000000 --- a/tests/codeception/tests/api/v1/LvinfoCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/Lvinfo/Lvinfo"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/Lvinfo/Lvinfo", array("sprache" => "0", "lehrveranstaltung_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/NewsCept.php b/tests/codeception/tests/api/v1/NewsCept.php deleted file mode 100644 index 059e0402a..000000000 --- a/tests/codeception/tests/api/v1/NewsCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/content/News/News"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/News/News", array("news_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/NotizCept.php b/tests/codeception/tests/api/v1/NotizCept.php deleted file mode 100644 index 514f7b8f7..000000000 --- a/tests/codeception/tests/api/v1/NotizCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/person/Notiz/Notiz"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Notiz/Notiz", array("notiz_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/ErhalterCept.php b/tests/codeception/tests/api/v1/OrganisationErhalterCept.php similarity index 77% rename from tests/codeception/tests/api/v1/ErhalterCept.php rename to tests/codeception/tests/api/v1/OrganisationErhalterCept.php index cc38cd7be..1ad417afb 100644 --- a/tests/codeception/tests/api/v1/ErhalterCept.php +++ b/tests/codeception/tests/api/v1/OrganisationErhalterCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Erhalter/Erhalter"); +$I->wantTo("Test API call v1/organisation/Erhalter/: Erhalter"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Erhalter/Erhalter", array("erhalter_kz" => "0")); +$I->sendGET("v1/organisation/Erhalter/Erhalter", array("erhalter_kz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/OrganisationFachbereich2Cept.php b/tests/codeception/tests/api/v1/OrganisationFachbereich2Cept.php new file mode 100644 index 000000000..6f3613efb --- /dev/null +++ b/tests/codeception/tests/api/v1/OrganisationFachbereich2Cept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/organisation/Fachbereich2/: Fachbereich"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/organisation/Fachbereich2/Fachbereich", array("fachbereich_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/FerienCept.php b/tests/codeception/tests/api/v1/OrganisationFerienCept.php similarity index 73% rename from tests/codeception/tests/api/v1/FerienCept.php rename to tests/codeception/tests/api/v1/OrganisationFerienCept.php index f4a6dbeb1..99db20163 100644 --- a/tests/codeception/tests/api/v1/FerienCept.php +++ b/tests/codeception/tests/api/v1/OrganisationFerienCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Ferien/Ferien"); +$I->wantTo("Test API call v1/organisation/Ferien/: Ferien"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Ferien/Ferien", array("studiengang_kz" => "0", "bezeichnung" => "0")); +$I->sendGET("v1/organisation/Ferien/Ferien", array("studiengang_kz" => "1", "bezeichnung" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/OrganisationGeschaeftsjahr2Cept.php b/tests/codeception/tests/api/v1/OrganisationGeschaeftsjahr2Cept.php new file mode 100644 index 000000000..546473ec1 --- /dev/null +++ b/tests/codeception/tests/api/v1/OrganisationGeschaeftsjahr2Cept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/organisation/Geschaeftsjahr2/: Geschaeftsjahr"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/organisation/Geschaeftsjahr2/Geschaeftsjahr", array("geschaeftsjahr_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/GruppeCept.php b/tests/codeception/tests/api/v1/OrganisationGruppeCept.php similarity index 78% rename from tests/codeception/tests/api/v1/GruppeCept.php rename to tests/codeception/tests/api/v1/OrganisationGruppeCept.php index 4b8dc7e42..af5ae0579 100644 --- a/tests/codeception/tests/api/v1/GruppeCept.php +++ b/tests/codeception/tests/api/v1/OrganisationGruppeCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Gruppe/Gruppe"); +$I->wantTo("Test API call v1/organisation/Gruppe/: Gruppe"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Gruppe/Gruppe", array("gruppe_kurzbz" => "0")); +$I->sendGET("v1/organisation/Gruppe/Gruppe", array("gruppe_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LehrverbandCept.php b/tests/codeception/tests/api/v1/OrganisationLehrverbandCept.php similarity index 65% rename from tests/codeception/tests/api/v1/LehrverbandCept.php rename to tests/codeception/tests/api/v1/OrganisationLehrverbandCept.php index 9dc693bdd..ea657b41f 100644 --- a/tests/codeception/tests/api/v1/LehrverbandCept.php +++ b/tests/codeception/tests/api/v1/OrganisationLehrverbandCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Lehrverband/Lehrverband"); +$I->wantTo("Test API call v1/organisation/Lehrverband/: Lehrverband"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Lehrverband/Lehrverband", array("gruppe" => "0", "verband" => "0", "semester" => "0", "studiengang_kz" => "0")); +$I->sendGET("v1/organisation/Lehrverband/Lehrverband", array("gruppe" => "1", "verband" => "1", "semester" => "1", "studiengang_kz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/OrganisationOrganisationseinheit2Cept.php b/tests/codeception/tests/api/v1/OrganisationOrganisationseinheit2Cept.php new file mode 100644 index 000000000..b3f479cf8 --- /dev/null +++ b/tests/codeception/tests/api/v1/OrganisationOrganisationseinheit2Cept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/organisation/Organisationseinheit2/: Organisationseinheit"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/organisation/Organisationseinheit2/Organisationseinheit", array("oe_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/OrganisationseinheittypCept.php b/tests/codeception/tests/api/v1/OrganisationOrganisationseinheittypCept.php similarity index 77% rename from tests/codeception/tests/api/v1/OrganisationseinheittypCept.php rename to tests/codeception/tests/api/v1/OrganisationOrganisationseinheittypCept.php index 6df0a4208..b7d1d73c4 100644 --- a/tests/codeception/tests/api/v1/OrganisationseinheittypCept.php +++ b/tests/codeception/tests/api/v1/OrganisationOrganisationseinheittypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Organisationseinheittyp/Organisationseinheittyp"); +$I->wantTo("Test API call v1/organisation/Organisationseinheittyp/: Organisationseinheittyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Organisationseinheittyp/Organisationseinheittyp", array("organisationseinheittyp_kurzbz" => "0")); +$I->sendGET("v1/organisation/Organisationseinheittyp/Organisationseinheittyp", array("organisationseinheittyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/SemesterwochenCept.php b/tests/codeception/tests/api/v1/OrganisationSemesterwochenCept.php similarity index 68% rename from tests/codeception/tests/api/v1/SemesterwochenCept.php rename to tests/codeception/tests/api/v1/OrganisationSemesterwochenCept.php index f905c1167..4a3c4e7b7 100644 --- a/tests/codeception/tests/api/v1/SemesterwochenCept.php +++ b/tests/codeception/tests/api/v1/OrganisationSemesterwochenCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Semesterwochen/Semesterwochen"); +$I->wantTo("Test API call v1/organisation/Semesterwochen/: Semesterwochen"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Semesterwochen/Semesterwochen", array("studiengang_kz" => "0", "semester" => "0")); +$I->sendGET("v1/organisation/Semesterwochen/Semesterwochen", array("studiengang_kz" => "1", "semester" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ServiceCept.php b/tests/codeception/tests/api/v1/OrganisationServiceCept.php similarity index 77% rename from tests/codeception/tests/api/v1/ServiceCept.php rename to tests/codeception/tests/api/v1/OrganisationServiceCept.php index d52826a1d..e8101e1e7 100644 --- a/tests/codeception/tests/api/v1/ServiceCept.php +++ b/tests/codeception/tests/api/v1/OrganisationServiceCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Service/Service"); +$I->wantTo("Test API call v1/organisation/Service/: Service"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Service/Service", array("service_id" => "0")); +$I->sendGET("v1/organisation/Service/Service", array("service_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StandortCept.php b/tests/codeception/tests/api/v1/OrganisationStandortCept.php similarity index 77% rename from tests/codeception/tests/api/v1/StandortCept.php rename to tests/codeception/tests/api/v1/OrganisationStandortCept.php index 35d6fd304..705f91c4c 100644 --- a/tests/codeception/tests/api/v1/StandortCept.php +++ b/tests/codeception/tests/api/v1/OrganisationStandortCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Standort/Standort"); +$I->wantTo("Test API call v1/organisation/Standort/: Standort"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Standort/Standort", array("standort_id" => "0")); +$I->sendGET("v1/organisation/Standort/Standort", array("standort_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StatistiksCept.php b/tests/codeception/tests/api/v1/OrganisationStatistikCept.php similarity index 59% rename from tests/codeception/tests/api/v1/StatistiksCept.php rename to tests/codeception/tests/api/v1/OrganisationStatistikCept.php index 11f5cbe4e..f611f99bc 100644 --- a/tests/codeception/tests/api/v1/StatistiksCept.php +++ b/tests/codeception/tests/api/v1/OrganisationStatistikCept.php @@ -1,24 +1,21 @@ wantTo("Test API call v1/organisation/statistik statistik, All and MenueArray"); +$I->wantTo("Test API call v1/organisation/Statistik/: Statistik All MenueArray"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/statistik/Statistik", array("statistik_kurzbz" => "Stromanalyse")); +$I->sendGET("v1/organisation/Statistik/Statistik", array("statistik_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/organisation/statistik/All"); +$I->sendGET("v1/organisation/Statistik/All", array("order" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/organisation/statistik/MenueArray"); +$I->sendGET("v1/organisation/Statistik/MenueArray", array()); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/OrganisationStudiengang2Cept.php b/tests/codeception/tests/api/v1/OrganisationStudiengang2Cept.php new file mode 100644 index 000000000..9724fd902 --- /dev/null +++ b/tests/codeception/tests/api/v1/OrganisationStudiengang2Cept.php @@ -0,0 +1,26 @@ +wantTo("Test API call v1/organisation/Studiengang2/: Studiengang AllForBewerbung StudiengangStudienplan StudiengangBewerbung"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/organisation/Studiengang2/Studiengang", array("studiengang_kz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiengang2/AllForBewerbung", array()); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiengang2/StudiengangStudienplan", array("studiensemester_kurzbz" => "1", "ausbildungssemester" => "1", "aktiv" => "1", "onlinebewerbung" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiengang2/StudiengangBewerbung", array()); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StudiengangstypCept.php b/tests/codeception/tests/api/v1/OrganisationStudiengangstypCept.php similarity index 73% rename from tests/codeception/tests/api/v1/StudiengangstypCept.php rename to tests/codeception/tests/api/v1/OrganisationStudiengangstypCept.php index d5f12311d..3213db18d 100644 --- a/tests/codeception/tests/api/v1/StudiengangstypCept.php +++ b/tests/codeception/tests/api/v1/OrganisationStudiengangstypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Studiengangstyp/Studiengangstyp"); +$I->wantTo("Test API call v1/organisation/Studiengangstyp/: Studiengangstyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Studiengangstyp/Studiengangstyp", array("typ" => "0")); +$I->sendGET("v1/organisation/Studiengangstyp/Studiengangstyp", array("typ" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StudienjahrCept.php b/tests/codeception/tests/api/v1/OrganisationStudienjahrCept.php similarity index 73% rename from tests/codeception/tests/api/v1/StudienjahrCept.php rename to tests/codeception/tests/api/v1/OrganisationStudienjahrCept.php index 0b19e85ab..485658f93 100644 --- a/tests/codeception/tests/api/v1/StudienjahrCept.php +++ b/tests/codeception/tests/api/v1/OrganisationStudienjahrCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Studienjahr/Studienjahr"); +$I->wantTo("Test API call v1/organisation/Studienjahr/: Studienjahr"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Studienjahr/Studienjahr", array("studienjahr_kurzbz" => "0")); +$I->sendGET("v1/organisation/Studienjahr/Studienjahr", array("studienjahr_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StudienordnungCept.php b/tests/codeception/tests/api/v1/OrganisationStudienordnungCept.php similarity index 71% rename from tests/codeception/tests/api/v1/StudienordnungCept.php rename to tests/codeception/tests/api/v1/OrganisationStudienordnungCept.php index 4932f9e6f..bcc292980 100644 --- a/tests/codeception/tests/api/v1/StudienordnungCept.php +++ b/tests/codeception/tests/api/v1/OrganisationStudienordnungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Studienordnung/Studienordnung"); +$I->wantTo("Test API call v1/organisation/Studienordnung/: Studienordnung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Studienordnung/Studienordnung", array("studienordnung_id" => "0")); +$I->sendGET("v1/organisation/Studienordnung/Studienordnung", array("studienordnung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StudienordnungstatusCept.php b/tests/codeception/tests/api/v1/OrganisationStudienordnungstatusCept.php similarity index 68% rename from tests/codeception/tests/api/v1/StudienordnungstatusCept.php rename to tests/codeception/tests/api/v1/OrganisationStudienordnungstatusCept.php index 7da110dcf..df369c015 100644 --- a/tests/codeception/tests/api/v1/StudienordnungstatusCept.php +++ b/tests/codeception/tests/api/v1/OrganisationStudienordnungstatusCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Studienordnungstatus/Studienordnungstatus"); +$I->wantTo("Test API call v1/organisation/Studienordnungstatus/: Studienordnungstatus"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Studienordnungstatus/Studienordnungstatus", array("status_kurzbz" => "0")); +$I->sendGET("v1/organisation/Studienordnungstatus/Studienordnungstatus", array("status_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/OrganisationStudienplanCept.php b/tests/codeception/tests/api/v1/OrganisationStudienplanCept.php new file mode 100644 index 000000000..e4307faa2 --- /dev/null +++ b/tests/codeception/tests/api/v1/OrganisationStudienplanCept.php @@ -0,0 +1,21 @@ +wantTo("Test API call v1/organisation/Studienplan/: Studienplan Studienplaene StudienplaeneFromSem"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/organisation/Studienplan/Studienplan", array("studienplan_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studienplan/Studienplaene", array("studiengang_kz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studienplan/StudienplaeneFromSem", array("studiengang_kz" => "1", "studiensemester_kurzbz" => "1", "ausbildungssemester" => "1", "orgform_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StudienplatzCept.php b/tests/codeception/tests/api/v1/OrganisationStudienplatzCept.php similarity index 73% rename from tests/codeception/tests/api/v1/StudienplatzCept.php rename to tests/codeception/tests/api/v1/OrganisationStudienplatzCept.php index 5f5124069..04208df92 100644 --- a/tests/codeception/tests/api/v1/StudienplatzCept.php +++ b/tests/codeception/tests/api/v1/OrganisationStudienplatzCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/organisation/Studienplatz/Studienplatz"); +$I->wantTo("Test API call v1/organisation/Studienplatz/: Studienplatz"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Studienplatz/Studienplatz", array("studienplatz_id" => "0")); +$I->sendGET("v1/organisation/Studienplatz/Studienplatz", array("studienplatz_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/OrganisationStudiensemesterCept.php b/tests/codeception/tests/api/v1/OrganisationStudiensemesterCept.php new file mode 100644 index 000000000..448b872b7 --- /dev/null +++ b/tests/codeception/tests/api/v1/OrganisationStudiensemesterCept.php @@ -0,0 +1,61 @@ +wantTo("Test API call v1/organisation/Studiensemester/: Studiensemester NextStudiensemester All Akt AktNext LastOrAktSemester NextFrom Previous Nearest Finished Timestamp"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/organisation/Studiensemester/Studiensemester", array("studiensemester_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiensemester/NextStudiensemester", array("art" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiensemester/All", array("order" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiensemester/Akt", array()); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiensemester/AktNext", array("semester" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiensemester/LastOrAktSemester", array("days" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiensemester/NextFrom", array("studiensemester_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiensemester/Previous", array()); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiensemester/Nearest", array("semester" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiensemester/Finished", array("limit" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/organisation/Studiensemester/Timestamp", array("studiensemester_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/Organisationseinheit2Cept.php b/tests/codeception/tests/api/v1/Organisationseinheit2Cept.php deleted file mode 100644 index ed3e9a8aa..000000000 --- a/tests/codeception/tests/api/v1/Organisationseinheit2Cept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/organisation/organisationseinheit/Organisationseinheit"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/organisationseinheit/Organisationseinheit", array("oe_kurzbz" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/OrtCept.php b/tests/codeception/tests/api/v1/OrtCept.php deleted file mode 100644 index b49f3610a..000000000 --- a/tests/codeception/tests/api/v1/OrtCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/ressource/Ort/Ort"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Ort/Ort", array("ort_kurzbz" => "0", "raumtyp_kurzbz" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/AblaufCept.php b/tests/codeception/tests/api/v1/PersonAdresseCept.php similarity index 65% rename from tests/codeception/tests/api/v1/AblaufCept.php rename to tests/codeception/tests/api/v1/PersonAdresseCept.php index 06ef8058a..717f23621 100644 --- a/tests/codeception/tests/api/v1/AblaufCept.php +++ b/tests/codeception/tests/api/v1/PersonAdresseCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/testtool/Ablauf/Ablauf"); +$I->wantTo("Test API call v1/person/Adresse/: Adresse"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/testtool/Ablauf/Ablauf", array("ablauf_id" => "0")); +$I->sendGET("v1/person/Adresse/Adresse", array("person_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BankverbindungCept.php b/tests/codeception/tests/api/v1/PersonBankverbindungCept.php similarity index 73% rename from tests/codeception/tests/api/v1/BankverbindungCept.php rename to tests/codeception/tests/api/v1/PersonBankverbindungCept.php index d7f654fdc..0dc4a26d3 100644 --- a/tests/codeception/tests/api/v1/BankverbindungCept.php +++ b/tests/codeception/tests/api/v1/PersonBankverbindungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/Bankverbindung/Bankverbindung"); +$I->wantTo("Test API call v1/person/Bankverbindung/: Bankverbindung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Bankverbindung/Bankverbindung", array("bankverbindung_id" => "0")); +$I->sendGET("v1/person/Bankverbindung/Bankverbindung", array("bankverbindung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PersonBenutzerCept.php b/tests/codeception/tests/api/v1/PersonBenutzerCept.php new file mode 100644 index 000000000..a6284cb6b --- /dev/null +++ b/tests/codeception/tests/api/v1/PersonBenutzerCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/person/Benutzer/: Benutzer"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/person/Benutzer/Benutzer", array("uid" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BenutzerfunktionCept.php b/tests/codeception/tests/api/v1/PersonBenutzerfunktionCept.php similarity index 71% rename from tests/codeception/tests/api/v1/BenutzerfunktionCept.php rename to tests/codeception/tests/api/v1/PersonBenutzerfunktionCept.php index 9c64a089d..9465335af 100644 --- a/tests/codeception/tests/api/v1/BenutzerfunktionCept.php +++ b/tests/codeception/tests/api/v1/PersonBenutzerfunktionCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/Benutzerfunktion/Benutzerfunktion"); +$I->wantTo("Test API call v1/person/Benutzerfunktion/: Benutzerfunktion"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Benutzerfunktion/Benutzerfunktion", array("benutzerfunktion_id" => "0")); +$I->sendGET("v1/person/Benutzerfunktion/Benutzerfunktion", array("benutzerfunktion_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BenutzergruppeCept.php b/tests/codeception/tests/api/v1/PersonBenutzergruppeCept.php similarity index 71% rename from tests/codeception/tests/api/v1/BenutzergruppeCept.php rename to tests/codeception/tests/api/v1/PersonBenutzergruppeCept.php index 82898bd82..d38a1559a 100644 --- a/tests/codeception/tests/api/v1/BenutzergruppeCept.php +++ b/tests/codeception/tests/api/v1/PersonBenutzergruppeCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/Benutzergruppe/Benutzergruppe"); +$I->wantTo("Test API call v1/person/Benutzergruppe/: Benutzergruppe"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Benutzergruppe/Benutzergruppe", array("gruppe_kurzbz" => "0", "uid" => "0")); +$I->sendGET("v1/person/Benutzergruppe/Benutzergruppe", array("gruppe_kurzbz" => "1", "uid" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PersonCept.php b/tests/codeception/tests/api/v1/PersonCept.php deleted file mode 100644 index 49ea26456..000000000 --- a/tests/codeception/tests/api/v1/PersonCept.php +++ /dev/null @@ -1,40 +0,0 @@ -wantTo('Test API call v1/person/person/ Person and CheckBewerbung'); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org'); - -$I->sendGET('v1/person/person/Person', array('person_id' => 3)); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson([ - 'person_id' => '3', - 'nachname' => 'McKenzie']); - -$I->sendGET('v1/person/person/Person', array('code' => '01234567B')); -$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org'); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson([ - 'person_id' => '4', - 'nachname' => 'Wilderman']); - -$I->sendGET('v1/person/person/Person', array('code' => '12345')); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson([ - 'error' => 0, - 'retval' => array()]); - -$I->sendGET('v1/person/person/Person', array('code' => '01234567C', 'email' => 'harvey.joshuah@calva.dev')); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson([ - 'person_id' => '5', - '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]); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/FotostatusCept.php b/tests/codeception/tests/api/v1/PersonFotostatusCept.php similarity index 76% rename from tests/codeception/tests/api/v1/FotostatusCept.php rename to tests/codeception/tests/api/v1/PersonFotostatusCept.php index 2c290d1bc..159ef3f5f 100644 --- a/tests/codeception/tests/api/v1/FotostatusCept.php +++ b/tests/codeception/tests/api/v1/PersonFotostatusCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/Fotostatus/Fotostatus"); +$I->wantTo("Test API call v1/person/Fotostatus/: Fotostatus"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Fotostatus/Fotostatus", array("fotostatus_kurzbz" => "0")); +$I->sendGET("v1/person/Fotostatus/Fotostatus", array("fotostatus_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/FreebusyCept.php b/tests/codeception/tests/api/v1/PersonFreebusyCept.php similarity index 79% rename from tests/codeception/tests/api/v1/FreebusyCept.php rename to tests/codeception/tests/api/v1/PersonFreebusyCept.php index bb561732f..1d91bb89b 100644 --- a/tests/codeception/tests/api/v1/FreebusyCept.php +++ b/tests/codeception/tests/api/v1/PersonFreebusyCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/Freebusy/Freebusy"); +$I->wantTo("Test API call v1/person/Freebusy/: Freebusy"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Freebusy/Freebusy", array("freebusy_id" => "0")); +$I->sendGET("v1/person/Freebusy/Freebusy", array("freebusy_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/FreebusytypCept.php b/tests/codeception/tests/api/v1/PersonFreebusytypCept.php similarity index 75% rename from tests/codeception/tests/api/v1/FreebusytypCept.php rename to tests/codeception/tests/api/v1/PersonFreebusytypCept.php index a4ffce588..0f61cb9e0 100644 --- a/tests/codeception/tests/api/v1/FreebusytypCept.php +++ b/tests/codeception/tests/api/v1/PersonFreebusytypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/Freebusytyp/Freebusytyp"); +$I->wantTo("Test API call v1/person/Freebusytyp/: Freebusytyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Freebusytyp/Freebusytyp", array("freebusytyp_kurzbz" => "0")); +$I->sendGET("v1/person/Freebusytyp/Freebusytyp", array("freebusytyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PersonKontaktCept.php b/tests/codeception/tests/api/v1/PersonKontaktCept.php new file mode 100644 index 000000000..6630d1d1d --- /dev/null +++ b/tests/codeception/tests/api/v1/PersonKontaktCept.php @@ -0,0 +1,31 @@ +wantTo("Test API call v1/person/Kontakt/: Kontakt OnlyKontakt KontaktByPersonID OnlyKontaktByPersonID 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->wait(); +$I->sendGET("v1/person/Kontakt/OnlyKontakt", array("kontakt_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/person/Kontakt/KontaktByPersonID", array("person_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/person/Kontakt/OnlyKontaktByPersonID", array("person_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/person/Kontakt/KontaktByPersonIDKontaktTyp", array("person_id" => "1", "kontakttyp" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/KontaktmediumCept.php b/tests/codeception/tests/api/v1/PersonKontaktmediumCept.php similarity index 73% rename from tests/codeception/tests/api/v1/KontaktmediumCept.php rename to tests/codeception/tests/api/v1/PersonKontaktmediumCept.php index 08eef8735..fb94aabfe 100644 --- a/tests/codeception/tests/api/v1/KontaktmediumCept.php +++ b/tests/codeception/tests/api/v1/PersonKontaktmediumCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/Kontaktmedium/Kontaktmedium"); +$I->wantTo("Test API call v1/person/Kontaktmedium/: Kontaktmedium"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Kontaktmedium/Kontaktmedium", array("kontaktmedium_kurzbz" => "0")); +$I->sendGET("v1/person/Kontaktmedium/Kontaktmedium", array("kontaktmedium_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/KontakttypCept.php b/tests/codeception/tests/api/v1/PersonKontakttypCept.php similarity index 77% rename from tests/codeception/tests/api/v1/KontakttypCept.php rename to tests/codeception/tests/api/v1/PersonKontakttypCept.php index 60132ef4a..e5641a51f 100644 --- a/tests/codeception/tests/api/v1/KontakttypCept.php +++ b/tests/codeception/tests/api/v1/PersonKontakttypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/Kontakttyp/Kontakttyp"); +$I->wantTo("Test API call v1/person/Kontakttyp/: Kontakttyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Kontakttyp/Kontakttyp", array("kontakttyp" => "0")); +$I->sendGET("v1/person/Kontakttyp/Kontakttyp", array("kontakttyp" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PersonNotizCept.php b/tests/codeception/tests/api/v1/PersonNotizCept.php new file mode 100644 index 000000000..fa8075664 --- /dev/null +++ b/tests/codeception/tests/api/v1/PersonNotizCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/person/Notiz/: Notiz"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/person/Notiz/Notiz", array("notiz_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/NotizzuordnungCept.php b/tests/codeception/tests/api/v1/PersonNotizzuordnungCept.php similarity index 73% rename from tests/codeception/tests/api/v1/NotizzuordnungCept.php rename to tests/codeception/tests/api/v1/PersonNotizzuordnungCept.php index 7a49afdb3..f42e4716c 100644 --- a/tests/codeception/tests/api/v1/NotizzuordnungCept.php +++ b/tests/codeception/tests/api/v1/PersonNotizzuordnungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/Notizzuordnung/Notizzuordnung"); +$I->wantTo("Test API call v1/person/Notizzuordnung/: Notizzuordnung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/Notizzuordnung/Notizzuordnung", array("notizzuordnung_id" => "0")); +$I->sendGET("v1/person/Notizzuordnung/Notizzuordnung", array("notizzuordnung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PersonPersonCept.php b/tests/codeception/tests/api/v1/PersonPersonCept.php new file mode 100644 index 000000000..7c51bc914 --- /dev/null +++ b/tests/codeception/tests/api/v1/PersonPersonCept.php @@ -0,0 +1,16 @@ +wantTo("Test API call v1/person/Person/: Person CheckBewerbung"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/person/Person/Person", array("person_id" => "1", "code" => "1", "email" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/person/Person/CheckBewerbung", array("email" => "1", "studiensemester_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AktivitaetCept.php b/tests/codeception/tests/api/v1/ProjectAktivitaetCept.php similarity index 76% rename from tests/codeception/tests/api/v1/AktivitaetCept.php rename to tests/codeception/tests/api/v1/ProjectAktivitaetCept.php index bf431f36b..335be190e 100644 --- a/tests/codeception/tests/api/v1/AktivitaetCept.php +++ b/tests/codeception/tests/api/v1/ProjectAktivitaetCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/project/Aktivitaet/Aktivitaet"); +$I->wantTo("Test API call v1/project/Aktivitaet/: Aktivitaet"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/project/Aktivitaet/Aktivitaet", array("aktivitaet_kurzbz" => "0")); +$I->sendGET("v1/project/Aktivitaet/Aktivitaet", array("aktivitaet_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AufwandstypCept.php b/tests/codeception/tests/api/v1/ProjectAufwandstypCept.php similarity index 75% rename from tests/codeception/tests/api/v1/AufwandstypCept.php rename to tests/codeception/tests/api/v1/ProjectAufwandstypCept.php index 9d8b13664..6110306cf 100644 --- a/tests/codeception/tests/api/v1/AufwandstypCept.php +++ b/tests/codeception/tests/api/v1/ProjectAufwandstypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/project/Aufwandstyp/Aufwandstyp"); +$I->wantTo("Test API call v1/project/Aufwandstyp/: Aufwandstyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/project/Aufwandstyp/Aufwandstyp", array("aufwandstyp_kurzbz" => "0")); +$I->sendGET("v1/project/Aufwandstyp/Aufwandstyp", array("aufwandstyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ProjektCept.php b/tests/codeception/tests/api/v1/ProjectProjektCept.php similarity index 79% rename from tests/codeception/tests/api/v1/ProjektCept.php rename to tests/codeception/tests/api/v1/ProjectProjektCept.php index c1fb1d4f8..020da46ca 100644 --- a/tests/codeception/tests/api/v1/ProjektCept.php +++ b/tests/codeception/tests/api/v1/ProjectProjektCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/project/Projekt/Projekt"); +$I->wantTo("Test API call v1/project/Projekt/: Projekt"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/project/Projekt/Projekt", array("projekt_kurzbz" => "0")); +$I->sendGET("v1/project/Projekt/Projekt", array("projekt_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/Projekt_ressourceCept.php b/tests/codeception/tests/api/v1/ProjectProjekt_ressourceCept.php similarity index 70% rename from tests/codeception/tests/api/v1/Projekt_ressourceCept.php rename to tests/codeception/tests/api/v1/ProjectProjekt_ressourceCept.php index fc2544ab3..2ed76b01b 100644 --- a/tests/codeception/tests/api/v1/Projekt_ressourceCept.php +++ b/tests/codeception/tests/api/v1/ProjectProjekt_ressourceCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/project/Projekt_ressource/Projekt_ressource"); +$I->wantTo("Test API call v1/project/Projekt_ressource/: Projekt_ressource"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/project/Projekt_ressource/Projekt_ressource", array("projekt_ressource_id" => "0")); +$I->sendGET("v1/project/Projekt_ressource/Projekt_ressource", array("projekt_ressource_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ProjektphaseCept.php b/tests/codeception/tests/api/v1/ProjectProjektphaseCept.php similarity index 75% rename from tests/codeception/tests/api/v1/ProjektphaseCept.php rename to tests/codeception/tests/api/v1/ProjectProjektphaseCept.php index cf44f55c3..a1da6196d 100644 --- a/tests/codeception/tests/api/v1/ProjektphaseCept.php +++ b/tests/codeception/tests/api/v1/ProjectProjektphaseCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/project/Projektphase/Projektphase"); +$I->wantTo("Test API call v1/project/Projektphase/: Projektphase"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/project/Projektphase/Projektphase", array("projektphase_id" => "0")); +$I->sendGET("v1/project/Projektphase/Projektphase", array("projektphase_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ProjekttaskCept.php b/tests/codeception/tests/api/v1/ProjectProjekttaskCept.php similarity index 75% rename from tests/codeception/tests/api/v1/ProjekttaskCept.php rename to tests/codeception/tests/api/v1/ProjectProjekttaskCept.php index f0b748cad..4261367bb 100644 --- a/tests/codeception/tests/api/v1/ProjekttaskCept.php +++ b/tests/codeception/tests/api/v1/ProjectProjekttaskCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/project/Projekttask/Projekttask"); +$I->wantTo("Test API call v1/project/Projekttask/: Projekttask"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/project/Projekttask/Projekttask", array("projekttask_id" => "0")); +$I->sendGET("v1/project/Projekttask/Projekttask", array("projekttask_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/RessourceCept.php b/tests/codeception/tests/api/v1/ProjectRessourceCept.php similarity index 77% rename from tests/codeception/tests/api/v1/RessourceCept.php rename to tests/codeception/tests/api/v1/ProjectRessourceCept.php index 875edd7cc..a410a4d99 100644 --- a/tests/codeception/tests/api/v1/RessourceCept.php +++ b/tests/codeception/tests/api/v1/ProjectRessourceCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/project/Ressource/Ressource"); +$I->wantTo("Test API call v1/project/Ressource/: Ressource"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/project/Ressource/Ressource", array("ressource_id" => "0")); +$I->sendGET("v1/project/Ressource/Ressource", array("ressource_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ProjectScrumsprintCept.php b/tests/codeception/tests/api/v1/ProjectScrumsprintCept.php new file mode 100644 index 000000000..83d0e5609 --- /dev/null +++ b/tests/codeception/tests/api/v1/ProjectScrumsprintCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/project/Scrumsprint/: Scrumsprint"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/project/Scrumsprint/Scrumsprint", array("scrumsprint_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ProjectScrumteamCept.php b/tests/codeception/tests/api/v1/ProjectScrumteamCept.php new file mode 100644 index 000000000..467837483 --- /dev/null +++ b/tests/codeception/tests/api/v1/ProjectScrumteamCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/project/Scrumteam/: Scrumteam"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/project/Scrumteam/Scrumteam", array("scrumteam_kurzbz" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PruefungsstatusCept.php b/tests/codeception/tests/api/v1/PruefungsstatusCept.php deleted file mode 100644 index d644c59ed..000000000 --- a/tests/codeception/tests/api/v1/PruefungsstatusCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/education/pruefungsstatus/Pruefungsstatus"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/pruefungsstatus/Pruefungsstatus", array("status_kurzbz" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/ReihungstestCept.php b/tests/codeception/tests/api/v1/ReihungstestCept.php deleted file mode 100644 index 39b7bbf2f..000000000 --- a/tests/codeception/tests/api/v1/ReihungstestCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/crm/Reihungstest/Reihungstest"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Reihungstest/Reihungstest", array("reihungstest_id" => "0", "studiengang_kz" => "0", "studiensemester_kurzbz" => "0", "person_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/BetriebsmittelCept.php b/tests/codeception/tests/api/v1/RessourceBetriebsmittelCept.php similarity index 72% rename from tests/codeception/tests/api/v1/BetriebsmittelCept.php rename to tests/codeception/tests/api/v1/RessourceBetriebsmittelCept.php index 786753aca..3cb893700 100644 --- a/tests/codeception/tests/api/v1/BetriebsmittelCept.php +++ b/tests/codeception/tests/api/v1/RessourceBetriebsmittelCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Betriebsmittel/Betriebsmittel"); +$I->wantTo("Test API call v1/ressource/Betriebsmittel/: Betriebsmittel"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Betriebsmittel/Betriebsmittel", array("betriebsmittel_id" => "0")); +$I->sendGET("v1/ressource/Betriebsmittel/Betriebsmittel", array("betriebsmittel_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AbschlussbeurteilungCept.php b/tests/codeception/tests/api/v1/RessourceBetriebsmittelperson2Cept.php similarity index 53% rename from tests/codeception/tests/api/v1/AbschlussbeurteilungCept.php rename to tests/codeception/tests/api/v1/RessourceBetriebsmittelperson2Cept.php index 002adc8a9..45a29937b 100644 --- a/tests/codeception/tests/api/v1/AbschlussbeurteilungCept.php +++ b/tests/codeception/tests/api/v1/RessourceBetriebsmittelperson2Cept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/abschlussbeurteilung/Abschlussbeurteilung"); +$I->wantTo("Test API call v1/ressource/Betriebsmittelperson2/: Betriebsmittelperson"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/abschlussbeurteilung/Abschlussbeurteilung", array("abschlussbeurteilung_kurzbz" => "0")); +$I->sendGET("v1/ressource/Betriebsmittelperson2/Betriebsmittelperson", array("betriebsmittelperson_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BetriebsmittelstatusCept.php b/tests/codeception/tests/api/v1/RessourceBetriebsmittelstatusCept.php similarity index 67% rename from tests/codeception/tests/api/v1/BetriebsmittelstatusCept.php rename to tests/codeception/tests/api/v1/RessourceBetriebsmittelstatusCept.php index 5038cca25..1cb34fd1a 100644 --- a/tests/codeception/tests/api/v1/BetriebsmittelstatusCept.php +++ b/tests/codeception/tests/api/v1/RessourceBetriebsmittelstatusCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Betriebsmittelstatus/Betriebsmittelstatus"); +$I->wantTo("Test API call v1/ressource/Betriebsmittelstatus/: Betriebsmittelstatus"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Betriebsmittelstatus/Betriebsmittelstatus", array("betriebsmittelstatus_kurzbz" => "0")); +$I->sendGET("v1/ressource/Betriebsmittelstatus/Betriebsmittelstatus", array("betriebsmittelstatus_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BetriebsmitteltypCept.php b/tests/codeception/tests/api/v1/RessourceBetriebsmitteltypCept.php similarity index 70% rename from tests/codeception/tests/api/v1/BetriebsmitteltypCept.php rename to tests/codeception/tests/api/v1/RessourceBetriebsmitteltypCept.php index 798abebe0..38defc2ca 100644 --- a/tests/codeception/tests/api/v1/BetriebsmitteltypCept.php +++ b/tests/codeception/tests/api/v1/RessourceBetriebsmitteltypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Betriebsmitteltyp/Betriebsmitteltyp"); +$I->wantTo("Test API call v1/ressource/Betriebsmitteltyp/: Betriebsmitteltyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Betriebsmitteltyp/Betriebsmitteltyp", array("betriebsmitteltyp" => "0")); +$I->sendGET("v1/ressource/Betriebsmitteltyp/Betriebsmitteltyp", array("betriebsmitteltyp" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/CoodleCept.php b/tests/codeception/tests/api/v1/RessourceCoodleCept.php similarity index 80% rename from tests/codeception/tests/api/v1/CoodleCept.php rename to tests/codeception/tests/api/v1/RessourceCoodleCept.php index 26a35931b..41793132c 100644 --- a/tests/codeception/tests/api/v1/CoodleCept.php +++ b/tests/codeception/tests/api/v1/RessourceCoodleCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Coodle/Coodle"); +$I->wantTo("Test API call v1/ressource/Coodle/: Coodle"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Coodle/Coodle", array("coodle_id" => "0")); +$I->sendGET("v1/ressource/Coodle/Coodle", array("coodle_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ErreichbarkeitCept.php b/tests/codeception/tests/api/v1/RessourceErreichbarkeitCept.php similarity index 71% rename from tests/codeception/tests/api/v1/ErreichbarkeitCept.php rename to tests/codeception/tests/api/v1/RessourceErreichbarkeitCept.php index 7188d9623..da2f61f2f 100644 --- a/tests/codeception/tests/api/v1/ErreichbarkeitCept.php +++ b/tests/codeception/tests/api/v1/RessourceErreichbarkeitCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Erreichbarkeit/Erreichbarkeit"); +$I->wantTo("Test API call v1/ressource/Erreichbarkeit/: Erreichbarkeit"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Erreichbarkeit/Erreichbarkeit", array("erreichbarkeit_kurzbz" => "0")); +$I->sendGET("v1/ressource/Erreichbarkeit/Erreichbarkeit", array("erreichbarkeit_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/FirmaCept.php b/tests/codeception/tests/api/v1/RessourceFirmaCept.php similarity index 65% rename from tests/codeception/tests/api/v1/FirmaCept.php rename to tests/codeception/tests/api/v1/RessourceFirmaCept.php index b64106855..a6d1009e1 100644 --- a/tests/codeception/tests/api/v1/FirmaCept.php +++ b/tests/codeception/tests/api/v1/RessourceFirmaCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Firma/Firma"); +$I->wantTo("Test API call v1/ressource/Firma/: Firma"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Firma/Firma", array("firma_id" => "0")); +$I->sendGET("v1/ressource/Firma/Firma", array("firma_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/RessourceFirmatagCept.php b/tests/codeception/tests/api/v1/RessourceFirmatagCept.php new file mode 100644 index 000000000..fe3238056 --- /dev/null +++ b/tests/codeception/tests/api/v1/RessourceFirmatagCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/ressource/Firmatag/: Firmatag"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/ressource/Firmatag/Firmatag", array("tag" => "1", "firma_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/FirmentypCept.php b/tests/codeception/tests/api/v1/RessourceFirmentypCept.php similarity index 76% rename from tests/codeception/tests/api/v1/FirmentypCept.php rename to tests/codeception/tests/api/v1/RessourceFirmentypCept.php index 39adaaf12..f4cb90baa 100644 --- a/tests/codeception/tests/api/v1/FirmentypCept.php +++ b/tests/codeception/tests/api/v1/RessourceFirmentypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Firmentyp/Firmentyp"); +$I->wantTo("Test API call v1/ressource/Firmentyp/: Firmentyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Firmentyp/Firmentyp", array("firmentyp_kurzbz" => "0")); +$I->sendGET("v1/ressource/Firmentyp/Firmentyp", array("firmentyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/FunktionCept.php b/tests/codeception/tests/api/v1/RessourceFunktionCept.php similarity index 77% rename from tests/codeception/tests/api/v1/FunktionCept.php rename to tests/codeception/tests/api/v1/RessourceFunktionCept.php index d64a009e7..bb891c1da 100644 --- a/tests/codeception/tests/api/v1/FunktionCept.php +++ b/tests/codeception/tests/api/v1/RessourceFunktionCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Funktion/Funktion"); +$I->wantTo("Test API call v1/ressource/Funktion/: Funktion"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Funktion/Funktion", array("funktion_kurzbz" => "0")); +$I->sendGET("v1/ressource/Funktion/Funktion", array("funktion_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/LehrmittelCept.php b/tests/codeception/tests/api/v1/RessourceLehrmittelCept.php similarity index 75% rename from tests/codeception/tests/api/v1/LehrmittelCept.php rename to tests/codeception/tests/api/v1/RessourceLehrmittelCept.php index 35e1bb850..f25688ad8 100644 --- a/tests/codeception/tests/api/v1/LehrmittelCept.php +++ b/tests/codeception/tests/api/v1/RessourceLehrmittelCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Lehrmittel/Lehrmittel"); +$I->wantTo("Test API call v1/ressource/Lehrmittel/: Lehrmittel"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Lehrmittel/Lehrmittel", array("lehrmittel_kurzbz" => "0")); +$I->sendGET("v1/ressource/Lehrmittel/Lehrmittel", array("lehrmittel_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/MitarbeiterCept.php b/tests/codeception/tests/api/v1/RessourceMitarbeiterCept.php similarity index 75% rename from tests/codeception/tests/api/v1/MitarbeiterCept.php rename to tests/codeception/tests/api/v1/RessourceMitarbeiterCept.php index c003fab3b..205296ecd 100644 --- a/tests/codeception/tests/api/v1/MitarbeiterCept.php +++ b/tests/codeception/tests/api/v1/RessourceMitarbeiterCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Mitarbeiter/Mitarbeiter"); +$I->wantTo("Test API call v1/ressource/Mitarbeiter/: Mitarbeiter"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Mitarbeiter/Mitarbeiter", array("mitarbeiter_uid" => "0")); +$I->sendGET("v1/ressource/Mitarbeiter/Mitarbeiter", array("mitarbeiter_uid" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/NationCept.php b/tests/codeception/tests/api/v1/RessourceOrtCept.php similarity index 63% rename from tests/codeception/tests/api/v1/NationCept.php rename to tests/codeception/tests/api/v1/RessourceOrtCept.php index bfced54c6..5a0486876 100644 --- a/tests/codeception/tests/api/v1/NationCept.php +++ b/tests/codeception/tests/api/v1/RessourceOrtCept.php @@ -1,18 +1,16 @@ wantTo("Test API call v1/codex/nation/ nation and all"); +$I->wantTo("Test API call v1/ressource/Ort/: Ort All"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/nation/nation", array("nation_code" => "A")); +$I->sendGET("v1/ressource/Ort/Ort", array("ort_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); $I->wait(); - -$I->sendGET("v1/codex/nation/All"); +$I->sendGET("v1/ressource/Ort/All", array("raumtyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/OrtraumtypCept.php b/tests/codeception/tests/api/v1/RessourceOrtraumtypCept.php similarity index 72% rename from tests/codeception/tests/api/v1/OrtraumtypCept.php rename to tests/codeception/tests/api/v1/RessourceOrtraumtypCept.php index 4799f9d51..2749f2fd3 100644 --- a/tests/codeception/tests/api/v1/OrtraumtypCept.php +++ b/tests/codeception/tests/api/v1/RessourceOrtraumtypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Ortraumtyp/Ortraumtyp"); +$I->wantTo("Test API call v1/ressource/Ortraumtyp/: Ortraumtyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Ortraumtyp/Ortraumtyp", array("hierarchie" => "0", "ort_kurzbz" => "0")); +$I->sendGET("v1/ressource/Ortraumtyp/Ortraumtyp", array("hierarchie" => "1", "ort_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PersonfunktionstandortCept.php b/tests/codeception/tests/api/v1/RessourcePersonfunktionstandortCept.php similarity index 66% rename from tests/codeception/tests/api/v1/PersonfunktionstandortCept.php rename to tests/codeception/tests/api/v1/RessourcePersonfunktionstandortCept.php index 62dce84c2..768be9039 100644 --- a/tests/codeception/tests/api/v1/PersonfunktionstandortCept.php +++ b/tests/codeception/tests/api/v1/RessourcePersonfunktionstandortCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Personfunktionstandort/Personfunktionstandort"); +$I->wantTo("Test API call v1/ressource/Personfunktionstandort/: Personfunktionstandort"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Personfunktionstandort/Personfunktionstandort", array("personfunktionstandort_id" => "0")); +$I->sendGET("v1/ressource/Personfunktionstandort/Personfunktionstandort", array("personfunktionstandort_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/RaumtypCept.php b/tests/codeception/tests/api/v1/RessourceRaumtypCept.php similarity index 78% rename from tests/codeception/tests/api/v1/RaumtypCept.php rename to tests/codeception/tests/api/v1/RessourceRaumtypCept.php index 1af186603..1bb7c2b47 100644 --- a/tests/codeception/tests/api/v1/RaumtypCept.php +++ b/tests/codeception/tests/api/v1/RessourceRaumtypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Raumtyp/Raumtyp"); +$I->wantTo("Test API call v1/ressource/Raumtyp/: Raumtyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Raumtyp/Raumtyp", array("raumtyp_kurzbz" => "0")); +$I->sendGET("v1/ressource/Raumtyp/Raumtyp", array("raumtyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ReservierungCept.php b/tests/codeception/tests/api/v1/RessourceReservierungCept.php similarity index 74% rename from tests/codeception/tests/api/v1/ReservierungCept.php rename to tests/codeception/tests/api/v1/RessourceReservierungCept.php index c14a6bc63..ff4a3ecb9 100644 --- a/tests/codeception/tests/api/v1/ReservierungCept.php +++ b/tests/codeception/tests/api/v1/RessourceReservierungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Reservierung/Reservierung"); +$I->wantTo("Test API call v1/ressource/Reservierung/: Reservierung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Reservierung/Reservierung", array("reservierung_id" => "0")); +$I->sendGET("v1/ressource/Reservierung/Reservierung", array("reservierung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ResturlaubCept.php b/tests/codeception/tests/api/v1/RessourceResturlaubCept.php similarity index 76% rename from tests/codeception/tests/api/v1/ResturlaubCept.php rename to tests/codeception/tests/api/v1/RessourceResturlaubCept.php index e3c464e5b..0ef24f310 100644 --- a/tests/codeception/tests/api/v1/ResturlaubCept.php +++ b/tests/codeception/tests/api/v1/RessourceResturlaubCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Resturlaub/Resturlaub"); +$I->wantTo("Test API call v1/ressource/Resturlaub/: Resturlaub"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Resturlaub/Resturlaub", array("resturlaub_id" => "0")); +$I->sendGET("v1/ressource/Resturlaub/Resturlaub", array("resturlaub_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PhraseCept.php b/tests/codeception/tests/api/v1/RessourceStundeCept.php similarity index 64% rename from tests/codeception/tests/api/v1/PhraseCept.php rename to tests/codeception/tests/api/v1/RessourceStundeCept.php index bec1d6a6e..2c4bf4ba6 100644 --- a/tests/codeception/tests/api/v1/PhraseCept.php +++ b/tests/codeception/tests/api/v1/RessourceStundeCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/phrase/Phrase"); +$I->wantTo("Test API call v1/ressource/Stunde/: Stunde"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/phrase/Phrase", array("phrase_id" => "1")); +$I->sendGET("v1/ressource/Stunde/Stunde", array("stunde" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StundenplanCept.php b/tests/codeception/tests/api/v1/RessourceStundenplanCept.php similarity index 75% rename from tests/codeception/tests/api/v1/StundenplanCept.php rename to tests/codeception/tests/api/v1/RessourceStundenplanCept.php index a5b018867..cc123f70c 100644 --- a/tests/codeception/tests/api/v1/StundenplanCept.php +++ b/tests/codeception/tests/api/v1/RessourceStundenplanCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Stundenplan/Stundenplan"); +$I->wantTo("Test API call v1/ressource/Stundenplan/: Stundenplan"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Stundenplan/Stundenplan", array("stundenplan_id" => "0")); +$I->sendGET("v1/ressource/Stundenplan/Stundenplan", array("stundenplan_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StundenplandevCept.php b/tests/codeception/tests/api/v1/RessourceStundenplandevCept.php similarity index 72% rename from tests/codeception/tests/api/v1/StundenplandevCept.php rename to tests/codeception/tests/api/v1/RessourceStundenplandevCept.php index bc4a53b4c..b3b0febbd 100644 --- a/tests/codeception/tests/api/v1/StundenplandevCept.php +++ b/tests/codeception/tests/api/v1/RessourceStundenplandevCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Stundenplandev/Stundenplandev"); +$I->wantTo("Test API call v1/ressource/Stundenplandev/: Stundenplandev"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Stundenplandev/Stundenplandev", array("stundenplandev_id" => "0")); +$I->sendGET("v1/ressource/Stundenplandev/Stundenplandev", array("stundenplandev_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZeitaufzeichnungCept.php b/tests/codeception/tests/api/v1/RessourceZeitaufzeichnungCept.php similarity index 70% rename from tests/codeception/tests/api/v1/ZeitaufzeichnungCept.php rename to tests/codeception/tests/api/v1/RessourceZeitaufzeichnungCept.php index 7b583e431..7c3eab914 100644 --- a/tests/codeception/tests/api/v1/ZeitaufzeichnungCept.php +++ b/tests/codeception/tests/api/v1/RessourceZeitaufzeichnungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Zeitaufzeichnung/Zeitaufzeichnung"); +$I->wantTo("Test API call v1/ressource/Zeitaufzeichnung/: Zeitaufzeichnung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Zeitaufzeichnung/Zeitaufzeichnung", array("zeitaufzeichnung_id" => "0")); +$I->sendGET("v1/ressource/Zeitaufzeichnung/Zeitaufzeichnung", array("zeitaufzeichnung_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZeitfensterCept.php b/tests/codeception/tests/api/v1/RessourceZeitfensterCept.php similarity index 65% rename from tests/codeception/tests/api/v1/ZeitfensterCept.php rename to tests/codeception/tests/api/v1/RessourceZeitfensterCept.php index 8b43a85ce..b835a476d 100644 --- a/tests/codeception/tests/api/v1/ZeitfensterCept.php +++ b/tests/codeception/tests/api/v1/RessourceZeitfensterCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Zeitfenster/Zeitfenster"); +$I->wantTo("Test API call v1/ressource/Zeitfenster/: Zeitfenster"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Zeitfenster/Zeitfenster", array("wochentag" => "0", "studiengang_kz" => "0", "ort_kurzbz" => "0", "stunde" => "0")); +$I->sendGET("v1/ressource/Zeitfenster/Zeitfenster", array("wochentag" => "1", "studiengang_kz" => "1", "ort_kurzbz" => "1", "stunde" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZeitsperreCept.php b/tests/codeception/tests/api/v1/RessourceZeitsperreCept.php similarity index 76% rename from tests/codeception/tests/api/v1/ZeitsperreCept.php rename to tests/codeception/tests/api/v1/RessourceZeitsperreCept.php index 6e951b5da..f43f7ea94 100644 --- a/tests/codeception/tests/api/v1/ZeitsperreCept.php +++ b/tests/codeception/tests/api/v1/RessourceZeitsperreCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Zeitsperre/Zeitsperre"); +$I->wantTo("Test API call v1/ressource/Zeitsperre/: Zeitsperre"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Zeitsperre/Zeitsperre", array("zeitsperre_id" => "0")); +$I->sendGET("v1/ressource/Zeitsperre/Zeitsperre", array("zeitsperre_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZeitsperretypCept.php b/tests/codeception/tests/api/v1/RessourceZeitsperretypCept.php similarity index 72% rename from tests/codeception/tests/api/v1/ZeitsperretypCept.php rename to tests/codeception/tests/api/v1/RessourceZeitsperretypCept.php index 42591f7df..5fca56e2b 100644 --- a/tests/codeception/tests/api/v1/ZeitsperretypCept.php +++ b/tests/codeception/tests/api/v1/RessourceZeitsperretypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Zeitsperretyp/Zeitsperretyp"); +$I->wantTo("Test API call v1/ressource/Zeitsperretyp/: Zeitsperretyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Zeitsperretyp/Zeitsperretyp", array("zeitsperretyp_kurzbz" => "0")); +$I->sendGET("v1/ressource/Zeitsperretyp/Zeitsperretyp", array("zeitsperretyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ZeitwunschCept.php b/tests/codeception/tests/api/v1/RessourceZeitwunschCept.php similarity index 70% rename from tests/codeception/tests/api/v1/ZeitwunschCept.php rename to tests/codeception/tests/api/v1/RessourceZeitwunschCept.php index 7daec3387..ce46257f7 100644 --- a/tests/codeception/tests/api/v1/ZeitwunschCept.php +++ b/tests/codeception/tests/api/v1/RessourceZeitwunschCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/ressource/Zeitwunsch/Zeitwunsch"); +$I->wantTo("Test API call v1/ressource/Zeitwunsch/: Zeitwunsch"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Zeitwunsch/Zeitwunsch", array("tag" => "0", "mitarbeiter_uid" => "0", "stunde" => "0")); +$I->sendGET("v1/ressource/Zeitwunsch/Zeitwunsch", array("tag" => "1", "mitarbeiter_uid" => "1", "stunde" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ScrumsprintCept.php b/tests/codeception/tests/api/v1/ScrumsprintCept.php deleted file mode 100644 index 5bb8f9e04..000000000 --- a/tests/codeception/tests/api/v1/ScrumsprintCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/project/scrumsprint/Scrumsprint"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/project/scrumsprint/Scrumsprint", array("scrumsprint_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/ScrumteamCept.php b/tests/codeception/tests/api/v1/ScrumteamCept.php deleted file mode 100644 index 117e245bd..000000000 --- a/tests/codeception/tests/api/v1/ScrumteamCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/project/scrumteam/Scrumteam"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/project/scrumteam/Scrumteam", array("scrumteam_kurzbz" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/Sprache2Cept.php b/tests/codeception/tests/api/v1/Sprache2Cept.php deleted file mode 100644 index 5cb44d11a..000000000 --- a/tests/codeception/tests/api/v1/Sprache2Cept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/system/sprache/Sprache"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/sprache/Sprache", array("sprache" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/StatistikCept.php b/tests/codeception/tests/api/v1/StatistikCept.php deleted file mode 100644 index bbfaf4690..000000000 --- a/tests/codeception/tests/api/v1/StatistikCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/organisation/Statistik/Statistik"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/organisation/Statistik/Statistik", array("statistik_kurzbz" => "0", "order" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/StudentCept.php b/tests/codeception/tests/api/v1/StudentCept.php deleted file mode 100644 index 204338981..000000000 --- a/tests/codeception/tests/api/v1/StudentCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/crm/Student/Student"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Student/Student", array("student_id" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/StudienplanCept.php b/tests/codeception/tests/api/v1/StudienplanCept.php deleted file mode 100644 index d0abd1271..000000000 --- a/tests/codeception/tests/api/v1/StudienplanCept.php +++ /dev/null @@ -1,43 +0,0 @@ -wantTo('Test API call v1/organisation/studienplan studienplaene and studienplaeneFromSem'); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org'); - -$I->sendGET('v1/organisation/studienplan/Studienplaene', array('studiengang_kz' => 1)); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(['error' => 0]); - -$I->sendGET('v1/organisation/studienplan/StudienplaeneFromSem', array('studiengang_kz' => 1, - 'studiensemester_kurzbz' => 'WS2016' - )); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(['error' => 0]); - -$I->sendGET('v1/organisation/studienplan/StudienplaeneFromSem', array('studiengang_kz' => 1, - 'studiensemester_kurzbz' => 'WS2016', - 'ausbildungssemester' => 1 - )); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(['error' => 0]); - -$I->sendGET('v1/organisation/studienplan/StudienplaeneFromSem', array('studiengang_kz' => 1, - 'studiensemester_kurzbz' => 'WS2016', - 'orgform_kurzbz' => 'VZ' - )); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(['error' => 0]); - -$I->sendGET('v1/organisation/studienplan/StudienplaeneFromSem', array('studiengang_kz' => 1, - 'studiensemester_kurzbz' => 'WS2016', - 'ausbildungssemester' => 1, - 'orgform_kurzbz' => 'VZ' - )); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(['error' => 0]); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/StudiensemesterCept.php b/tests/codeception/tests/api/v1/StudiensemesterCept.php deleted file mode 100644 index ef0e611ff..000000000 --- a/tests/codeception/tests/api/v1/StudiensemesterCept.php +++ /dev/null @@ -1,96 +0,0 @@ -wantTo("Test API call to all v1/organisation/studiensemester methods"); -$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->wait(); - -$I->sendGET("v1/organisation/studiensemester/NextStudiensemester"); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/NextStudiensemester", array("art" => "WS")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/All"); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/Akt"); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/AktNext", array("semester" => "1")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/AktNext", array("semester" => "2")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/LastOrAktSemester"); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/LastOrAktSemester", array("days" => "1024")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/NextFrom", array("studiensemester_kurzbz" => "WS2015")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/Previous"); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/Nearest", array("studiensemester_kurzbz" => "WS2015")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/Finished"); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/Finished", array("limit" => "3")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); - -$I->sendGET("v1/organisation/studiensemester/Timestamp", array("studiensemester_kurzbz" => "WS2015")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/StundeCept.php b/tests/codeception/tests/api/v1/StundeCept.php deleted file mode 100644 index d49c148d2..000000000 --- a/tests/codeception/tests/api/v1/StundeCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/ressource/Stunde/Stunde"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/ressource/Stunde/Stunde", array("stunde" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/SystemAppdatenCept.php b/tests/codeception/tests/api/v1/SystemAppdatenCept.php new file mode 100644 index 000000000..c8a6b5302 --- /dev/null +++ b/tests/codeception/tests/api/v1/SystemAppdatenCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/system/Appdaten/: Appdaten"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/system/Appdaten/Appdaten", array("appdaten_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BenutzerrolleCept.php b/tests/codeception/tests/api/v1/SystemBenutzerrolleCept.php similarity index 74% rename from tests/codeception/tests/api/v1/BenutzerrolleCept.php rename to tests/codeception/tests/api/v1/SystemBenutzerrolleCept.php index 123cbb64d..1cbdc5208 100644 --- a/tests/codeception/tests/api/v1/BenutzerrolleCept.php +++ b/tests/codeception/tests/api/v1/SystemBenutzerrolleCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Benutzerrolle/Benutzerrolle"); +$I->wantTo("Test API call v1/system/Benutzerrolle/: Benutzerrolle"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Benutzerrolle/Benutzerrolle", array("benutzerrolle_id" => "0")); +$I->sendGET("v1/system/Benutzerrolle/Benutzerrolle", array("benutzerrolle_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BerechtigungCept.php b/tests/codeception/tests/api/v1/SystemBerechtigungCept.php similarity index 74% rename from tests/codeception/tests/api/v1/BerechtigungCept.php rename to tests/codeception/tests/api/v1/SystemBerechtigungCept.php index e386827bd..31a63aea8 100644 --- a/tests/codeception/tests/api/v1/BerechtigungCept.php +++ b/tests/codeception/tests/api/v1/SystemBerechtigungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Berechtigung/Berechtigung"); +$I->wantTo("Test API call v1/system/Berechtigung/: Berechtigung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Berechtigung/Berechtigung", array("berechtigung_kurzbz" => "0")); +$I->sendGET("v1/system/Berechtigung/Berechtigung", array("berechtigung_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/CallerLibraryCept.php b/tests/codeception/tests/api/v1/SystemCallerLibraryCept.php similarity index 100% rename from tests/codeception/tests/api/v1/CallerLibraryCept.php rename to tests/codeception/tests/api/v1/SystemCallerLibraryCept.php diff --git a/tests/codeception/tests/api/v1/CallerModelCept.php b/tests/codeception/tests/api/v1/SystemCallerModelCept.php similarity index 100% rename from tests/codeception/tests/api/v1/CallerModelCept.php rename to tests/codeception/tests/api/v1/SystemCallerModelCept.php diff --git a/tests/codeception/tests/api/v1/CronjobCept.php b/tests/codeception/tests/api/v1/SystemCronjobCept.php similarity index 80% rename from tests/codeception/tests/api/v1/CronjobCept.php rename to tests/codeception/tests/api/v1/SystemCronjobCept.php index b1aae94a9..f9a98d115 100644 --- a/tests/codeception/tests/api/v1/CronjobCept.php +++ b/tests/codeception/tests/api/v1/SystemCronjobCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Cronjob/Cronjob"); +$I->wantTo("Test API call v1/system/Cronjob/: Cronjob"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Cronjob/Cronjob", array("cronjob_id" => "0")); +$I->sendGET("v1/system/Cronjob/Cronjob", array("cronjob_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AdresseCept.php b/tests/codeception/tests/api/v1/SystemFilterCept.php similarity index 65% rename from tests/codeception/tests/api/v1/AdresseCept.php rename to tests/codeception/tests/api/v1/SystemFilterCept.php index 28da6d806..aec516b89 100644 --- a/tests/codeception/tests/api/v1/AdresseCept.php +++ b/tests/codeception/tests/api/v1/SystemFilterCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/person/adresse/Adresse"); +$I->wantTo("Test API call v1/system/Filter/: Filter"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/person/adresse/Adresse", array("person_id" => 0)); +$I->sendGET("v1/system/Filter/Filter", array("filter_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/DmsCept.php b/tests/codeception/tests/api/v1/SystemLogCept.php similarity index 67% rename from tests/codeception/tests/api/v1/DmsCept.php rename to tests/codeception/tests/api/v1/SystemLogCept.php index 2a54319d6..d00f75acd 100644 --- a/tests/codeception/tests/api/v1/DmsCept.php +++ b/tests/codeception/tests/api/v1/SystemLogCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/content/dms/dms"); +$I->wantTo("Test API call v1/system/Log/: Log"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/content/dms/Dms", array("dms_id" => 1)); +$I->sendGET("v1/system/Log/Log", array("log_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/SystemMessageCept.php b/tests/codeception/tests/api/v1/SystemMessageCept.php new file mode 100644 index 000000000..8c802b563 --- /dev/null +++ b/tests/codeception/tests/api/v1/SystemMessageCept.php @@ -0,0 +1,26 @@ +wantTo("Test API call v1/system/Message/: MessagesByPersonID MessagesByUID MessagesByToken SentMessagesByPerson"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/system/Message/MessagesByPersonID", array("person_id" => "1", "all" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/system/Message/MessagesByUID", array("uid" => "1", "all" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/system/Message/MessagesByToken", array("token" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/system/Message/SentMessagesByPerson", array("person_id" => "1", "all" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/SystemPhraseCept.php b/tests/codeception/tests/api/v1/SystemPhraseCept.php new file mode 100644 index 000000000..7564f73e3 --- /dev/null +++ b/tests/codeception/tests/api/v1/SystemPhraseCept.php @@ -0,0 +1,16 @@ +wantTo("Test API call v1/system/Phrase/: Phrase Phrases"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/system/Phrase/Phrase", array("phrase_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); +$I->sendGET("v1/system/Phrase/Phrases", array("app" => "1", "sprache" => "1", "phrase" => "1", "orgeinheit_kurzbz" => "1", "orgform_kurzbz" => "1", "blockTags" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/StatusCept.php b/tests/codeception/tests/api/v1/SystemRolleCept.php similarity index 65% rename from tests/codeception/tests/api/v1/StatusCept.php rename to tests/codeception/tests/api/v1/SystemRolleCept.php index 00b671522..0c0ba57a5 100644 --- a/tests/codeception/tests/api/v1/StatusCept.php +++ b/tests/codeception/tests/api/v1/SystemRolleCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/crm/Status/Status"); +$I->wantTo("Test API call v1/system/Rolle/: Rolle"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/crm/Status/Status", array("status_kurzbz" => "0")); +$I->sendGET("v1/system/Rolle/Rolle", array("rolle_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/RolleberechtigungCept.php b/tests/codeception/tests/api/v1/SystemRolleberechtigungCept.php similarity index 67% rename from tests/codeception/tests/api/v1/RolleberechtigungCept.php rename to tests/codeception/tests/api/v1/SystemRolleberechtigungCept.php index 0e2c1dceb..8b85c7020 100644 --- a/tests/codeception/tests/api/v1/RolleberechtigungCept.php +++ b/tests/codeception/tests/api/v1/SystemRolleberechtigungCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Rolleberechtigung/Rolleberechtigung"); +$I->wantTo("Test API call v1/system/Rolleberechtigung/: Rolleberechtigung"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Rolleberechtigung/Rolleberechtigung", array("rolle_kurzbz" => "0", "berechtigung_kurzbz" => "0")); +$I->sendGET("v1/system/Rolleberechtigung/Rolleberechtigung", array("rolle_kurzbz" => "1", "berechtigung_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/ServerCept.php b/tests/codeception/tests/api/v1/SystemServerCept.php similarity index 80% rename from tests/codeception/tests/api/v1/ServerCept.php rename to tests/codeception/tests/api/v1/SystemServerCept.php index 7b019865e..38a68ad74 100644 --- a/tests/codeception/tests/api/v1/ServerCept.php +++ b/tests/codeception/tests/api/v1/SystemServerCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Server/Server"); +$I->wantTo("Test API call v1/system/Server/: Server"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Server/Server", array("server_kurzbz" => "0")); +$I->sendGET("v1/system/Server/Server", array("server_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/Konto2Cept.php b/tests/codeception/tests/api/v1/SystemSprache2Cept.php similarity index 64% rename from tests/codeception/tests/api/v1/Konto2Cept.php rename to tests/codeception/tests/api/v1/SystemSprache2Cept.php index 09195b535..b3e2b9c68 100644 --- a/tests/codeception/tests/api/v1/Konto2Cept.php +++ b/tests/codeception/tests/api/v1/SystemSprache2Cept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/accounting/konto/Konto"); +$I->wantTo("Test API call v1/system/Sprache2/: Sprache"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/accounting/konto/Konto", array("konto_id" => "0")); +$I->sendGET("v1/system/Sprache2/Sprache", array("sprache" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/BundeslandCept.php b/tests/codeception/tests/api/v1/SystemTagCept.php similarity index 67% rename from tests/codeception/tests/api/v1/BundeslandCept.php rename to tests/codeception/tests/api/v1/SystemTagCept.php index d544908fd..e26e43795 100644 --- a/tests/codeception/tests/api/v1/BundeslandCept.php +++ b/tests/codeception/tests/api/v1/SystemTagCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/codex/bundesland/All"); +$I->wantTo("Test API call v1/system/Tag/: Tag"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/bundesland/All"); +$I->sendGET("v1/system/Tag/Tag", array("tag" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/SystemVariableCept.php b/tests/codeception/tests/api/v1/SystemVariableCept.php new file mode 100644 index 000000000..f92a5a3d3 --- /dev/null +++ b/tests/codeception/tests/api/v1/SystemVariableCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/system/Variable/: Variable"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/system/Variable/Variable", array("uid" => "1", "name" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/VorlageCept.php b/tests/codeception/tests/api/v1/SystemVorlageCept.php similarity index 79% rename from tests/codeception/tests/api/v1/VorlageCept.php rename to tests/codeception/tests/api/v1/SystemVorlageCept.php index b264df56e..02ef6505f 100644 --- a/tests/codeception/tests/api/v1/VorlageCept.php +++ b/tests/codeception/tests/api/v1/SystemVorlageCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Vorlage/Vorlage"); +$I->wantTo("Test API call v1/system/Vorlage/: Vorlage"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Vorlage/Vorlage", array("vorlage_kurzbz" => "0")); +$I->sendGET("v1/system/Vorlage/Vorlage", array("vorlage_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/VorlagestudiengangCept.php b/tests/codeception/tests/api/v1/SystemVorlagestudiengangCept.php similarity index 70% rename from tests/codeception/tests/api/v1/VorlagestudiengangCept.php rename to tests/codeception/tests/api/v1/SystemVorlagestudiengangCept.php index abf3fec54..29f4e7f9a 100644 --- a/tests/codeception/tests/api/v1/VorlagestudiengangCept.php +++ b/tests/codeception/tests/api/v1/SystemVorlagestudiengangCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Vorlagestudiengang/Vorlagestudiengang"); +$I->wantTo("Test API call v1/system/Vorlagestudiengang/: Vorlagestudiengang"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Vorlagestudiengang/Vorlagestudiengang", array("vorlagestudiengang_id" => "0")); +$I->sendGET("v1/system/Vorlagestudiengang/Vorlagestudiengang", array("vorlagestudiengang_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/WebservicelogCept.php b/tests/codeception/tests/api/v1/SystemWebservicelogCept.php similarity index 74% rename from tests/codeception/tests/api/v1/WebservicelogCept.php rename to tests/codeception/tests/api/v1/SystemWebservicelogCept.php index 5116e69c9..9d50762d1 100644 --- a/tests/codeception/tests/api/v1/WebservicelogCept.php +++ b/tests/codeception/tests/api/v1/SystemWebservicelogCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Webservicelog/Webservicelog"); +$I->wantTo("Test API call v1/system/Webservicelog/: Webservicelog"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Webservicelog/Webservicelog", array("webservicelog_id" => "0")); +$I->sendGET("v1/system/Webservicelog/Webservicelog", array("webservicelog_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/WebservicerechtCept.php b/tests/codeception/tests/api/v1/SystemWebservicerechtCept.php similarity index 72% rename from tests/codeception/tests/api/v1/WebservicerechtCept.php rename to tests/codeception/tests/api/v1/SystemWebservicerechtCept.php index 97c2841ca..c4e8894b9 100644 --- a/tests/codeception/tests/api/v1/WebservicerechtCept.php +++ b/tests/codeception/tests/api/v1/SystemWebservicerechtCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Webservicerecht/Webservicerecht"); +$I->wantTo("Test API call v1/system/Webservicerecht/: Webservicerecht"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Webservicerecht/Webservicerecht", array("webservicerecht_id" => "0")); +$I->sendGET("v1/system/Webservicerecht/Webservicerecht", array("webservicerecht_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/WebservicetypCept.php b/tests/codeception/tests/api/v1/SystemWebservicetypCept.php similarity index 73% rename from tests/codeception/tests/api/v1/WebservicetypCept.php rename to tests/codeception/tests/api/v1/SystemWebservicetypCept.php index 53d47e5d0..0cb25c155 100644 --- a/tests/codeception/tests/api/v1/WebservicetypCept.php +++ b/tests/codeception/tests/api/v1/SystemWebservicetypCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/system/Webservicetyp/Webservicetyp"); +$I->wantTo("Test API call v1/system/Webservicetyp/: Webservicetyp"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Webservicetyp/Webservicetyp", array("webservicetyp_kurzbz" => "0")); +$I->sendGET("v1/system/Webservicetyp/Webservicetyp", array("webservicetyp_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/TestCept.php b/tests/codeception/tests/api/v1/TestCept.php index c4c54a7fd..688868cc8 100644 --- a/tests/codeception/tests/api/v1/TestCept.php +++ b/tests/codeception/tests/api/v1/TestCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/Test/test"); +$I->wantTo("Test API call v1/Test/: Test"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/Test/test"); +$I->sendGET("v1/Test/Test", array()); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); -$I->seeResponseContainsJson(["success" => true]); -$I->wait(); \ No newline at end of file +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/GebietCept.php b/tests/codeception/tests/api/v1/TesttoolAblaufCept.php similarity index 65% rename from tests/codeception/tests/api/v1/GebietCept.php rename to tests/codeception/tests/api/v1/TesttoolAblaufCept.php index c472883fb..eaaf62dbb 100644 --- a/tests/codeception/tests/api/v1/GebietCept.php +++ b/tests/codeception/tests/api/v1/TesttoolAblaufCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/testtool/Gebiet/Gebiet"); +$I->wantTo("Test API call v1/testtool/Ablauf/: Ablauf"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/testtool/Gebiet/Gebiet", array("gebiet_id" => "0")); +$I->sendGET("v1/testtool/Ablauf/Ablauf", array("ablauf_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AntwortCept.php b/tests/codeception/tests/api/v1/TesttoolAntwortCept.php similarity index 79% rename from tests/codeception/tests/api/v1/AntwortCept.php rename to tests/codeception/tests/api/v1/TesttoolAntwortCept.php index 18d8d495c..a959203c6 100644 --- a/tests/codeception/tests/api/v1/AntwortCept.php +++ b/tests/codeception/tests/api/v1/TesttoolAntwortCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/testtool/Antwort/Antwort"); +$I->wantTo("Test API call v1/testtool/Antwort/: Antwort"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/testtool/Antwort/Antwort", array("antwort_id" => "0")); +$I->sendGET("v1/testtool/Antwort/Antwort", array("antwort_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/TesttoolFrageCept.php b/tests/codeception/tests/api/v1/TesttoolFrageCept.php new file mode 100644 index 000000000..482f3a869 --- /dev/null +++ b/tests/codeception/tests/api/v1/TesttoolFrageCept.php @@ -0,0 +1,11 @@ +wantTo("Test API call v1/testtool/Frage/: Frage"); +$I->amHttpAuthenticated("admin", "1q2w3"); +$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); +$I->sendGET("v1/testtool/Frage/Frage", array("frage_id" => "1")); +$I->seeResponseCodeIs(200); +$I->seeResponseIsJson(); +$I->seeResponseContainsJson(["error" => 0]); +$I->wait(); diff --git a/tests/codeception/tests/api/v1/AbgabeCept.php b/tests/codeception/tests/api/v1/TesttoolGebietCept.php similarity index 63% rename from tests/codeception/tests/api/v1/AbgabeCept.php rename to tests/codeception/tests/api/v1/TesttoolGebietCept.php index 2a984c35a..a61f71f16 100644 --- a/tests/codeception/tests/api/v1/AbgabeCept.php +++ b/tests/codeception/tests/api/v1/TesttoolGebietCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/education/abgabe/Abgabe"); +$I->wantTo("Test API call v1/testtool/Gebiet/: Gebiet"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/education/abgabe/Abgabe", array("abgabe_id" => "0")); +$I->sendGET("v1/testtool/Gebiet/Gebiet", array("gebiet_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/KategorieCept.php b/tests/codeception/tests/api/v1/TesttoolKategorieCept.php similarity index 76% rename from tests/codeception/tests/api/v1/KategorieCept.php rename to tests/codeception/tests/api/v1/TesttoolKategorieCept.php index 67aa72453..7913e6612 100644 --- a/tests/codeception/tests/api/v1/KategorieCept.php +++ b/tests/codeception/tests/api/v1/TesttoolKategorieCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/testtool/Kategorie/Kategorie"); +$I->wantTo("Test API call v1/testtool/Kategorie/: Kategorie"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/testtool/Kategorie/Kategorie", array("kategorie_kurzbz" => "0")); +$I->sendGET("v1/testtool/Kategorie/Kategorie", array("kategorie_kurzbz" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/KriterienCept.php b/tests/codeception/tests/api/v1/TesttoolKriterienCept.php similarity index 77% rename from tests/codeception/tests/api/v1/KriterienCept.php rename to tests/codeception/tests/api/v1/TesttoolKriterienCept.php index 7a5de8344..f67377dbe 100644 --- a/tests/codeception/tests/api/v1/KriterienCept.php +++ b/tests/codeception/tests/api/v1/TesttoolKriterienCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/testtool/Kriterien/Kriterien"); +$I->wantTo("Test API call v1/testtool/Kriterien/: Kriterien"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/testtool/Kriterien/Kriterien", array("kriterien_id" => "0")); +$I->sendGET("v1/testtool/Kriterien/Kriterien", array("kriterien_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/PrueflingCept.php b/tests/codeception/tests/api/v1/TesttoolPrueflingCept.php similarity index 77% rename from tests/codeception/tests/api/v1/PrueflingCept.php rename to tests/codeception/tests/api/v1/TesttoolPrueflingCept.php index 306bce7d6..3d74cecce 100644 --- a/tests/codeception/tests/api/v1/PrueflingCept.php +++ b/tests/codeception/tests/api/v1/TesttoolPrueflingCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/testtool/Pruefling/Pruefling"); +$I->wantTo("Test API call v1/testtool/Pruefling/: Pruefling"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/testtool/Pruefling/Pruefling", array("pruefling_id" => "0")); +$I->sendGET("v1/testtool/Pruefling/Pruefling", array("pruefling_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/VorschlagCept.php b/tests/codeception/tests/api/v1/TesttoolVorschlagCept.php similarity index 77% rename from tests/codeception/tests/api/v1/VorschlagCept.php rename to tests/codeception/tests/api/v1/TesttoolVorschlagCept.php index f44214299..6a06b3915 100644 --- a/tests/codeception/tests/api/v1/VorschlagCept.php +++ b/tests/codeception/tests/api/v1/TesttoolVorschlagCept.php @@ -1,12 +1,11 @@ wantTo("Test API call v1/testtool/Vorschlag/Vorschlag"); +$I->wantTo("Test API call v1/testtool/Vorschlag/: Vorschlag"); $I->amHttpAuthenticated("admin", "1q2w3"); $I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/testtool/Vorschlag/Vorschlag", array("vorschlag_id" => "0")); +$I->sendGET("v1/testtool/Vorschlag/Vorschlag", array("vorschlag_id" => "1")); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file +$I->wait(); diff --git a/tests/codeception/tests/api/v1/VariableCept.php b/tests/codeception/tests/api/v1/VariableCept.php deleted file mode 100644 index f5a2f9f5b..000000000 --- a/tests/codeception/tests/api/v1/VariableCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/system/Variable/Variable"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/system/Variable/Variable", array("uid" => "0", "name" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/ZgvCept.php b/tests/codeception/tests/api/v1/ZgvCept.php deleted file mode 100644 index 2417e5ac4..000000000 --- a/tests/codeception/tests/api/v1/ZgvCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/codex/Zgv/Zgv"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Zgv/Zgv", array("zgv_code" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/api/v1/ZweckCept.php b/tests/codeception/tests/api/v1/ZweckCept.php deleted file mode 100644 index fcfac9261..000000000 --- a/tests/codeception/tests/api/v1/ZweckCept.php +++ /dev/null @@ -1,12 +0,0 @@ -wantTo("Test API call v1/codex/Zweck/Zweck"); -$I->amHttpAuthenticated("admin", "1q2w3"); -$I->haveHttpHeader("FHC-API-KEY", "testapikey@fhcomplete.org"); - -$I->sendGET("v1/codex/Zweck/Zweck", array("zweck_code" => "0")); -$I->seeResponseCodeIs(200); -$I->seeResponseIsJson(); -$I->seeResponseContainsJson(["error" => 0]); -$I->wait(); \ No newline at end of file diff --git a/tests/codeception/tests/unit/BasisKlasseTest.php b/tests/codeception/tests/unit/BasisKlasseTest.php deleted file mode 100644 index 932c2a1ed..000000000 --- a/tests/codeception/tests/unit/BasisKlasseTest.php +++ /dev/null @@ -1,27 +0,0 @@ -errormsg=true; - $this->assertTrue($bc->getErrorMsg()); - } - -}