mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Allow traits to be covered
This commit is contained in:
@ -227,7 +227,7 @@ final class TestCall
|
||||
public function covers(string ...$classesOrFunctions): self
|
||||
{
|
||||
foreach ($classesOrFunctions as $classOrFunction) {
|
||||
$isClass = class_exists($classOrFunction);
|
||||
$isClass = class_exists($classOrFunction) || trait_exists($classOrFunction);
|
||||
$isMethod = function_exists($classOrFunction);
|
||||
|
||||
if (! $isClass && ! $isMethod) {
|
||||
|
||||
Reference in New Issue
Block a user