Answer the question
In order to leave comments, you need to log in
How to exclude a file from coverage in PHPUnit by pattern?
Good afternoon!
There was a need to exclude from coverage (test coverage analysis) all files that contain the word "Factory".
I would like to specify an exception in phpunit.xml.dist . There is an option through the @codeCoverageIgnore annotation, but it does not quite fit, because it becomes more difficult to maintain such code.
Maybe someone faced such a task?
Answer the question
In order to leave comments, you need to log in
Thank you, but this option is not suitable, since my factories are NOT in one place, but next to handlers with different hierarchies. The option that you suggested is suitable for one specific file only.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question