-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to ignore covers annotation #573
Add option to ignore covers annotation #573
Conversation
c17138a
to
be5c988
Compare
@BackEndTea why it was closed and not merged? Souds useful. Corresponding stackoverflow question here. |
Yes, this would be very useful. Right now I can't use the coverage report in several of my projects without either removing the @Covers tags or adding a whole lot that I think are better not added. |
Presumably this was closed because it sat here for one and a half year without any review. |
@JeroenDeDauw but you can - the whole point of
I don't understand what's your problem - you can run the PHPUnit with only some test classes having the |
@kubawerlos are you saying I can literally add |
No, I'm saying one way or another - benefit from What what you writing I understood you have the annotations, but sometimes you don't want to use them - that's what confuses me - what is the reason of the inconsistency? |
When you follow something like the clean architecture, you end up with a bunch of use cases that hold application logic and typically each have a request model and a response model. These two model objects are simple DTOs and are not worth unit testing. There are other classes not worth unit testing. The integration tests for the use cases only have one covers tag: for the use case. They do not have a long list of all these other classes, which I think they should not be required to have. So even though my whole application is tested on a sensible level, code coverage shows (incorrectly) low, and is not usable for finding code that is not tested. Example codebase: https://github.com/wmde/fundraising-donations |
Can't you just whitelist/blacklist what you want? |
That would require many entries and create maintenance overhead. All in all, less preferred than not having the coverage work at all. |
This PR:
If preferred, i can also make a PR against v5.3 instead