Skip to content

Commit c996399

Browse files
committed
Consider new boolean parameter in Generator::testDouble() added in PHPUnit 10.4
1 parent e7762fd commit c996399

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Stub.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,12 @@ public static function constructEmptyExcept(
415415

416416
private static function generateMock()
417417
{
418-
return self::doGenerateMock(func_get_args());
418+
$args = func_get_args();
419+
if (version_compare(PHPUnitVersion::series(), '10.4', '>=') && !is_bool($args[1])) {
420+
array_splice($args, 1, 0, [true]);
421+
}
422+
423+
return self::doGenerateMock($args);
419424
}
420425

421426
/**

0 commit comments

Comments
 (0)