Skip to content

Implicitly include (abstract) parent class with #[CoversClass] and #[UsesClass] attributes #5733

@spriebsch

Description

@spriebsch

Code Coverage: when I'm testing a concrete class that extends an abstract base class, I have to create annotations for both.

Since it's technically not possible to test a subclass in isolation from its base class, PHPUnit should not force me to list the abstract base class (either in CoversClass or UsesClass) explicitly. That's an implementation detail that PHPUnit could implicitly assume.

Metadata

Metadata

Labels

feature/code-coverageIssues related to code coverage (but not php-code-coverage)feature/metadataIssues related to attributes and annotationstype/enhancementA new idea that should be implemented

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions