Skip to content

Allow attributes for code coverage targeting to also be used on the test method level (instead of only on the test class level) #5837

@neclimdul

Description

@neclimdul

CoversMethod was helpfully added however it only allows targeting classes. In the discussion leading up the interest seems to have been for targeting methods.

#5175 (comment)
#5175 (comment)

For me, this feature was useful in previous versions for making coverage reports explicit as well as to see when a test is maybe not needed or needs to be updated because a method name changes similar to {@inheritDoc} or #[Override] adjusted for tests.

It would nice if this was also allowed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions