File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,14 @@ private static function generateMockForAbstractClass(): object
433433 private static function doGenerateMock ($ args , $ isAbstract = false )
434434 {
435435 $ testCase = self ::extractTestCaseFromArgs ($ args );
436- $ methodName = $ isAbstract ? 'getMockForAbstractClass ' : 'getMock ' ;
436+
437+ // PHPUnit 10.4 changed method names
438+ if (version_compare (PHPUnitVersion::series (), '10.4 ' , '>= ' )) {
439+ $ methodName = $ isAbstract ? 'mockObjectForAbstractClass ' : 'testDouble ' ;
440+ } else {
441+ $ methodName = $ isAbstract ? 'getMockForAbstractClass ' : 'getMock ' ;
442+ }
443+
437444 // PHPUnit 10.3 changed the namespace
438445 if (version_compare (PHPUnitVersion::series (), '10.3 ' , '>= ' )) {
439446 $ generatorClass = new Generator ();
You can’t perform that action at this time.
0 commit comments