In phpunit you can @covers annotations in docblocks above test methods. Is this also possible with pest php?
Whatever object the test and it functions in pest php return, allow me to call a covers method on it. But it is not documented on how that should work. I cannot pass in a docblock. I can pass in a class name. But I don’t know how to reference a method.
You can either cover a class or a function but I don't think it's possible to do anything equivalent to covering a specific method at the moment.
This is the implementation of the
covers()
method in Pest (found atpes-up/pest/src/PendingCalls/TestCall.php
)This means you can do something like:
or
but not