From 80dbf3b6d6512d3d3b08e0a667e027ef88ef8c13 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 14 Oct 2017 18:02:43 +0200 Subject: [PATCH] Adjustments based on code changes --- components/modules.md | 2 +- quality/tests.md | 4 ++-- security/security_guidelines.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/modules.md b/components/modules.md index 5ee6c32..ea18288 100644 --- a/components/modules.md +++ b/components/modules.md @@ -70,7 +70,7 @@ class Installer extends InstallerAbstract { parent::install(__DIR__ . '/..', $dbPool, $info); - switch ($dbPool->get('core')->getType()) { + switch ($dbPool->get()->getType()) { case DatabaseType::MYSQL: /* Your database setup goes here */ break; diff --git a/quality/tests.md b/quality/tests.md index 1ea7d49..a45d683 100644 --- a/quality/tests.md +++ b/quality/tests.md @@ -1,6 +1,6 @@ # Tests -The applications goal is to achive 90% code coverage, which applies for the core application as well as all modules. All unit tests are located in a separate repository `Tests`. +The applications goal is to achive 90% code coverage, which applies for the core application as well as all modules. All unit tests are located in a separate repository `Tests`. The frameworks code coverage has to be greater than 75% at all times. ## PHPUnit @@ -8,7 +8,7 @@ This application uses PHPUnit as unit testing framework. The PHPUnit directory i ### Modules -Every module needs to have a `Admin` directory containing a class called `AdminTest.php` which is used for testing the installation, activation, deactivation, uninstall and remove of the module. Tests that install, update, remove etc. a module need to have a group called `admin`. After running the `AdminTest.php` test the final state of the module should be installed and active, only this way it's possible to further test the controller and models. A code coverage of 80% is mandatory for every module for integration. +Every module needs to have a `Admin` directory containing a class called `AdminTest.php` which is used for testing the installation, activation, deactivation, uninstall and remove of the module. Tests that install, update, remove etc. a module need to have a group called `admin`. After running the `AdminTest.php` test the final state of the module should be installed and active, only this way it's possible to further test the controller and models. A code coverage of 75% is mandatory for every module for integration. ## Jasmine diff --git a/security/security_guidelines.md b/security/security_guidelines.md index 2b42350..8cfc5a9 100644 --- a/security/security_guidelines.md +++ b/security/security_guidelines.md @@ -20,7 +20,7 @@ Example usage in a module handling a API request: ``` if($request->getData('CSRF') === null) { - $response->setStatusCode(RequestStatus::R_403); + $response->setStatusCode(RequestStatusCode::R_403); /* optional */ $response->set($request->__toString(), new Notify('Unknown referrer!', NotifyType::INFO));