sebastianbergmann / phpunit

The PHP Unit Testing framework.

Home Page:https://phpunit.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

spriebsch opened this issue · comments

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.