Skip to content

Commit 0216efe

Browse files
committed
Remove obsolete version check since this package requires PHPUnit 8 or higher
1 parent 4aaeffd commit 0216efe

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/Stub.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -441,18 +441,13 @@ private static function doGenerateMock($args, $isAbstract = false)
441441
$generatorClass = new LegacyGenerator();
442442
}
443443

444-
// using PHPUnit 5.4 mocks registration
445-
if (version_compare(PHPUnitVersion::series(), '5.4', '>=')
446-
&& $testCase instanceof PHPUnitTestCase
447-
) {
448-
$mock = call_user_func_array([$generatorClass, $methodName], $args);
449-
$testCase->registerMockObject($mock);
450-
return $mock;
451-
}
444+
$mock = call_user_func_array([$generatorClass, $methodName], $args);
445+
452446
if ($testCase instanceof PHPUnitTestCase) {
453-
$generatorClass = $testCase;
447+
$testCase->registerMockObject($mock);
454448
}
455-
return call_user_func_array([$generatorClass, $methodName], $args);
449+
450+
return $mock;
456451
}
457452

458453
private static function extractTestCaseFromArgs(&$args)

0 commit comments

Comments
 (0)