mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Merge pull request #1220 from gehrisandro/fix/accept-traits-in-covers-function
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