Skip to content

Commit 114fdc4

Browse files
committed
Support spy() method as well
1 parent 6a3ec2d commit 114fdc4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Mockery/Type/MockDynamicReturnTypeExtension.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ public function getClass(): string
2222

2323
public function isStaticMethodSupported(MethodReflection $methodReflection): bool
2424
{
25-
return $methodReflection->getName() === 'mock';
25+
return in_array($methodReflection->getName(), [
26+
'mock',
27+
'spy',
28+
], true);
2629
}
2730

2831
public function getTypeFromStaticMethodCall(

0 commit comments

Comments
 (0)