moodle-plugin-ci
moodle-plugin-ci copied to clipboard
Add support for --testsuite, --config, --filter to phpunit runs
By default, phpunit is always executed with the --configuration option that uses the plugin own phpunit.xml created on init (that is executed by default with the --buildcomponentconfigs that creates those distributed files.
And that's ok 99% of times (default behavior).
No matter of that, sometimes you may want to run some other testsuite (elsewhere in code), or maybe point to another, custom, phpunit configuration file. Or, also, filter the run to any class or test.
So this issue is about to allow the phpunit command to accept and handle properly these 3 options:
- --testsuite
- --configuration
- --filter
The use of any of them should stop the default behavior to be applied, getting precedence.
Ciao :-)
We found an easy workaround, just call phpunit directly:
cd moodle
vendor/bin/phpunit --filter tool_dataprivacy_metadata_registry_testcase