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
433
433
private static function doGenerateMock ($ args , $ isAbstract = false )
434
434
{
435
435
$ 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
+
437
444
// PHPUnit 10.3 changed the namespace
438
445
if (version_compare (PHPUnitVersion::series (), '10.3 ' , '>= ' )) {
439
446
$ generatorClass = new Generator ();
You can’t perform that action at this time.
0 commit comments