mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 02:07:23 +01:00
Fix covers function to accept traits
This commit is contained in:
@ -526,8 +526,8 @@ final class TestCall
|
|||||||
$isTrait = trait_exists($classOrFunction);
|
$isTrait = trait_exists($classOrFunction);
|
||||||
$isFunction = function_exists($classOrFunction);
|
$isFunction = function_exists($classOrFunction);
|
||||||
|
|
||||||
if (! $isClass && ! $isFunction) {
|
if (! $isClass && ! $isTrait && ! $isFunction) {
|
||||||
throw new InvalidArgumentException(sprintf('No class or method named "%s" has been found.', $classOrFunction));
|
throw new InvalidArgumentException(sprintf('No class, trait or method named "%s" has been found.', $classOrFunction));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($isClass) {
|
if ($isClass) {
|
||||||
|
|||||||
Reference in New Issue
Block a user