Skip to content
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

Mark tests as risky if the @covers-annotation is missing even without code coverage #4246

Closed
pluempyx opened this issue May 27, 2020 · 1 comment
Assignees
Labels
type/enhancement A new idea that should be implemented
Milestone

Comments

@pluempyx
Copy link

When I use the config parameter forceCoversAnnotation="true" and beStrictAboutCoversAnnotation="true" tests are marked as risky, if they do not have a @covers-annotation. But this only happens if the code coverage is measured during the running of the tests. It could be an idea to mark tests as risky if the annotation is missing completely even when not measuring code coverage, because the test will be marked risky as soon as coverage is measured.

From my understanding the more detailed analysis (if the code covered by the test matches the given information provided via @Covers and @uses) can only be done with code coverage measuring turned on.

@pluempyx pluempyx added the type/enhancement A new idea that should be implemented label May 27, 2020
@sebastianbergmann sebastianbergmann self-assigned this May 28, 2020
@sebastianbergmann sebastianbergmann added this to the PHPUnit 9.2 milestone May 28, 2020
@pluempyx
Copy link
Author

Thank you very much :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A new idea that should be implemented
Projects
None yet
Development

No branches or pull requests

2 participants