File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments