Skip to content

Commit

Permalink
Hopefully improve message
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 5, 2020
1 parent 3fd2cf1 commit b7fd781
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Framework/MockObject/InvocationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private function findMatcher(Invocation $invocation): ?Matcher
if (\count($result) > 1) {
throw new RuntimeException(
\sprintf(
'Non unique mocked method invocation: %s::%s',
'More than one invocation handler has been configured for %s::%s()',
$invocation->getClassName(),
$invocation->getMethodName()
)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Framework/MockObject/InvocationHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function testNonUniqueMatchThrowsException(): void
->willReturn('result');

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

$mock->foo();
}
Expand Down

0 comments on commit b7fd781

Please sign in to comment.