More generic matching for at covers annotation #4937
Labels
feature/code-coverage
Issues related to code coverage (but not php-code-coverage)
feature/metadata
Issues related to attributes and annotations
type/enhancement
A new idea that should be implemented
From my learnings of unit testing, the importance is placed on testing the unit of functionality, not individual classes.
With that in mind, I declare an interface and create a testable implementation of that interface. According to PHPUnit, I am to declare the
@covers
annotation set to that class, and for every class covered. Good so far.In testing, implementing, and then refactoring my code, I break my implementation class out into smaller 'private' classes (like in Java) that will never be instantiated outside the scope of the covered class. PHPUnit currently requires that I add another
@covers
annotation for every class I refactor out.Would it be simpler to declare wildcard patterns like:
The first is the class implementing the interface, the second is the namespace for those pseudo 'private' classes.
In an ideal world, I would love to be able to declare
@covers \My\Space\MyClass
and it be treated as a class and/or namespace to cover.The text was updated successfully, but these errors were encountered: