mirror of
https://github.com/Karaka-Management/Developer-Guide.git
synced 2026-01-12 21:08:40 +00:00
Adjustments based on code changes
This commit is contained in:
parent
4f165660cd
commit
80dbf3b6d6
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user