Skip to content

Commit 20235e8

Browse files
committed
Support getMockForAbstractClass
1 parent 3d4f607 commit 20235e8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Type/PHPUnit/CreateMockDynamicReturnTypeExtension.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@ public static function getClass(): string
1919

2020
public function isMethodSupported(MethodReflection $methodReflection): bool
2121
{
22-
return $methodReflection->getName() === 'createMock';
22+
return in_array(
23+
$methodReflection->getName(),
24+
[
25+
'createMock',
26+
'getMockForAbstractClass',
27+
],
28+
true
29+
);
2330
}
2431

2532
public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope): Type

0 commit comments

Comments
 (0)