Skip to content

Commit 4303b9e

Browse files
Merge branch '11.0'
2 parents d155897 + 665d8d1 commit 4303b9e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Framework/MockObject/Generator/Generator.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,12 @@ private function generateCodeForTestDoubleClass(string $type, bool $mockObject,
768768
}
769769

770770
if ($mockMethods->hasMethod('method') || (isset($class) && $class->hasMethod('method'))) {
771-
$message = 'Doubling interfaces (or classes) that have a method named "method" is deprecated. Support for this will be removed in PHPUnit 12.';
771+
$message = sprintf(
772+
'%s %s has a method named "method". Doubling %s that have a method named "method" is deprecated. Support for this will be removed in PHPUnit 12.',
773+
($isInterface) ? 'Interface' : 'Class',
774+
isset($class) ? $class->getName() : $type,
775+
($isInterface) ? 'interfaces' : 'classes',
776+
);
772777

773778
try {
774779
EventFacade::emitter()->testTriggeredPhpunitDeprecation(

0 commit comments

Comments
 (0)