From 94fc3631ca49b862cd6f1d51373102fdb9f58f48 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Mon, 25 Nov 2024 12:48:36 +0100 Subject: [PATCH 1/2] Rephrase exception message --- src/Framework/MockObject/Runtime/Rule/Parameters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Framework/MockObject/Runtime/Rule/Parameters.php b/src/Framework/MockObject/Runtime/Rule/Parameters.php index a1f100d08d..8258d7cb48 100644 --- a/src/Framework/MockObject/Runtime/Rule/Parameters.php +++ b/src/Framework/MockObject/Runtime/Rule/Parameters.php @@ -88,7 +88,7 @@ private function doVerify(): bool } if ($this->invocation === null) { - throw new ExpectationFailedException('Mocked method does not exist.'); + throw new ExpectationFailedException('Doubled method does not exist.'); } if (count($this->invocation->parameters()) < count($this->parameters)) { From c5c350263fd23819f0f27ff41570c4fa191b60d1 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Mon, 25 Nov 2024 12:48:48 +0100 Subject: [PATCH 2/2] Simplify --- src/Framework/MockObject/Runtime/Rule/Parameters.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Framework/MockObject/Runtime/Rule/Parameters.php b/src/Framework/MockObject/Runtime/Rule/Parameters.php index 8258d7cb48..61c7918745 100644 --- a/src/Framework/MockObject/Runtime/Rule/Parameters.php +++ b/src/Framework/MockObject/Runtime/Rule/Parameters.php @@ -117,8 +117,7 @@ private function doVerify(): bool $parameter->evaluate( $other, sprintf( - 'Parameter %s for invocation %s does not match expected ' . - 'value.', + 'Parameter %s for invocation %s does not match expected value.', $i, $this->invocation->toString(), ),