Skip to content

Commit b7fd781

Browse files
Hopefully improve message
1 parent 3fd2cf1 commit b7fd781

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Framework/MockObject/InvocationHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ private function findMatcher(Invocation $invocation): ?Matcher
181181
if (\count($result) > 1) {
182182
throw new RuntimeException(
183183
\sprintf(
184-
'Non unique mocked method invocation: %s::%s',
184+
'More than one invocation handler has been configured for %s::%s()',
185185
$invocation->getClassName(),
186186
$invocation->getMethodName()
187187
)

tests/unit/Framework/MockObject/InvocationHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testNonUniqueMatchThrowsException(): void
5353
->willReturn('result');
5454

5555
$this->expectException(RuntimeException::class);
56-
$this->expectExceptionMessage('Non unique mocked method invocation: stdClass::foo');
56+
$this->expectExceptionMessage('More than one invocation handler has been configured for stdClass::foo()');
5757

5858
$mock->foo();
5959
}

0 commit comments

Comments
 (0)