From 45f9746285da60916e115152ebb5e612d40dd639 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 17 Jan 2016 18:32:27 +0100 Subject: [PATCH] Init tests --- tests.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests.md diff --git a/tests.md b/tests.md new file mode 100644 index 0000000..8520b17 --- /dev/null +++ b/tests.md @@ -0,0 +1,11 @@ +# 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`. + +## PHPUnit + +This application uses PHPUnit as unit testing framework. The PHPUnit directory is structured the same way as the `Framework`, `Modules`, `Install` and `Models` directories. Unit tests for specific classes need to be named in the same manner as the testing class. + +### 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. \ No newline at end of file