From 7d85e108fd4c9618f900187047485180a053420d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 22 Oct 2023 16:42:14 +0000 Subject: [PATCH] fix phpunit command --- quality/inspections.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/quality/inspections.md b/quality/inspections.md index 77fb551..b46cc73 100755 --- a/quality/inspections.md +++ b/quality/inspections.md @@ -143,11 +143,18 @@ php vendor/bin/phpunit -c tests/PHPUnit/phpunit_no_coverage.xml In order to also create a code coverage report run: ```sh -php -dxdebug.remote_enable=1 -dxdebug.mode=coverage,develop vendor/bin/phpunit -c tests/phpunit_default.xml --log-junit Build/test/junit_php.xml --coverage-html Build/coverage +php -dxdebug.mode=coverage,develop vendor/bin/phpunit -c tests/phpunit_default.xml --log-junit Build/test/junit_php.xml --coverage-html Build/coverage ``` A visualization of the coverage can be found at http://127.0.0.1/Build/coverage +If you would like to run a individual test suit run: + +```sh +php -dxdebug.remote_enable=1 -dxdebug.start_with_request=yes -dxdebug.mode=coverage,develop vendor/bin/phpunit tests/MyTest.php + +``` + #### 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 at least 90% is mandatory for every module for integration.