Skip to content
Snippets Groups Projects
Commit d2c1e462 authored by jurgenhaas's avatar jurgenhaas
Browse files

#12 Add PhpMetrics tests

parent fd24a441
No related branches found
No related tags found
1 merge request!8Merging develop into main
Pipeline #768389 passed
......@@ -39,7 +39,8 @@ commands:
cmd: |
module=$1
shift
ahoy d4d exec vendor/bin/phpunit --configuration /var/www/html/tests/phpunit.xml.dist web/modules/contrib/$module $@
mkdir -p tests/junit
ahoy d4d exec vendor/bin/phpunit --log-junit tests/junit/${module}.xml --configuration /var/www/html/tests/phpunit.xml.dist web/modules/contrib/$module $@
usage: PHP unit tests by module
phpunit:list:suites:
cmd: ahoy d4d exec vendor/bin/phpunit --configuration /var/www/html/tests/phpunit.xml.dist --list-suites "$@"
......@@ -64,3 +65,12 @@ commands:
shift
ahoy d4d exec vendor/bin/parallel-lint web/modules/contrib/$module $@
usage: PHP lint tests by module
phpmetricsmodule:
cmd: |
module=$1
shift
mkdir -p tests/metrics/$module
JUNIT=
if [[ -f tests/junit/${module}.xml ]]; then JUNIT=--junit=tests/junit/${module}.xml; fi
ahoy d4d exec vendor/bin/phpmetrics --report-html=tests/metrics/$module $JUNIT web/modules/contrib/$module $@
usage: PHP Metrics by module
......@@ -132,6 +132,8 @@ class Handler extends BaseHandler {
$this->gitIgnore('tests/codesniffer_results.txt');
$this->gitIgnore('tests/checkstyle.xml');
$this->gitIgnore('tests/codesniffer_fixes.patch');
$this->gitIgnore('tests/junit');
$this->gitIgnore('tests/metrics');
// Git Ignore output from simpletest.
$this->gitIgnore('web/sites/simpletest');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment