#[UsesInterface]
attribute
#5734
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
Code regularly depends on interfaces, e.g. when working with a collaborator. In the spirit of loose coupling, it should not really matter which implementation of an interface I'm using in a test.
Currently, however, I have to explicitly list the used implementation of an interface by a UsesClass annotation.
I am proposing a new annotation, namely UsesInterface. With this, I specify that the tested code unit depdends upon/uses an implementation of said interface. For the Uses part, we don't care too much which one that is, thus I should not be forced to list production code or hand-crafted stubs explicitly.
The text was updated successfully, but these errors were encountered: