Skip to content

Commit

Permalink
Consider new boolean parameter in Generator::testDouble() added in PH…
Browse files Browse the repository at this point in the history
…PUnit 10.4
  • Loading branch information
W0rma committed Oct 6, 2023
1 parent e7762fd commit c996399
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,12 @@ public static function constructEmptyExcept(

private static function generateMock()
{
return self::doGenerateMock(func_get_args());
$args = func_get_args();
if (version_compare(PHPUnitVersion::series(), '10.4', '>=') && !is_bool($args[1])) {
array_splice($args, 1, 0, [true]);
}

return self::doGenerateMock($args);
}

/**
Expand Down

0 comments on commit c996399

Please sign in to comment.