Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 3, 2019
1 parent b0aa578 commit b827cc9
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/MockBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public function addMethods(array $methods): self
if ($reflector->hasMethod($method)) {
throw new RuntimeException(
\sprintf(
'Trying to set mock method "%s" with addMethods, but it exists in class "%s". Use onlyMethods() for methods that exist in the class.',
'Trying to set mock method "%s" with addMethods(), but it exists in class "%s". Use onlyMethods() for methods that exist in the class.',
$method,
$this->type
)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Framework/MockObject/MockBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function testOnlyMethodsWithEmptyArray(): void
public function testAddMethodsWithNonExistentMethodNames(): void
{
$this->expectException(RuntimeException::class);
$this->expectExceptionMessage('Trying to set mock method "mockableMethod" with addMethods, but it exists in class "Mockable". Use onlyMethods() for methods that exist in the class.');
$this->expectExceptionMessage('Trying to set mock method "mockableMethod" with addMethods(), but it exists in class "Mockable". Use onlyMethods() for methods that exist in the class.');

$this->getMockBuilder(Mockable::class)
->addMethods(['mockableMethod'])
Expand Down

0 comments on commit b827cc9

Please sign in to comment.