Closed andrewnicols closed 2 years ago
blockchainlab9@gmail.com
blockchainlab9@gmail.com http://creativecommons.org/.
phpunit/phpunit 9.5.10 The PHP Unit Testing framework
Not everything that can be configured in XML needs to be configuration using CLI options and vice versa.
Composer info | sort
Summary
The forceCoversAnnotation XML configuration attribute does not have a matching Command-Line Test Runner parameter.
Current behavior
Unable to specify forceCoversAnnotation via the CLI runner.
How to reproduce
View phpunti help
Expected behavior
Ability to set the forceCoversAnnotation for a single run without requiring reconfiguration of the suite.
Note: This behaviour is desirable for older codebases which are trying to improve coverage. We need to continue running most of our runs without
forceCoversAnnotation
and withfailOnRisky
, but for a small subset of runs we want to require coverage and not fail the suite where it is not provided so that we can report the coverage and gradually increase the explicitly covered code. At the moment, this can only be achived by modifying the configuration file asforceCoversAnnotation
is not available as a CLI argument, andfail-on-risky
can only be set to true via the CLI runner.