Skip to content

Commit

Permalink
Allow traits to be covered
Browse files Browse the repository at this point in the history
  • Loading branch information
titantwentyone committed May 5, 2023
1 parent a34767f commit 963b7f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PendingCalls/TestCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function todo(): self
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) {
Expand Down

0 comments on commit 963b7f4

Please sign in to comment.