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