@@ -94,7 +94,7 @@ public function testExpectationThatMethodIsCalledOnceFailsWhenMethodIsNeverCalle
9494 $ double ->expects ($ this ->once ())->method ('doSomething ' );
9595
9696 $ this ->assertThatMockObjectExpectationFails (
97- ' " doSomething()" was expected to be invoked once but was never invoked. ' ,
97+ AnInterface::class . ' :: doSomething() was expected to be invoked once but was never invoked. ' ,
9898 $ double ,
9999 );
100100 }
@@ -161,7 +161,7 @@ public function testExpectationThatMethodIsCalledAtLeastOnceFailsWhenMethodIsNot
161161 $ double ->expects ($ this ->atLeastOnce ())->method ('doSomething ' );
162162
163163 $ this ->assertThatMockObjectExpectationFails (
164- ' " doSomething()" was expected to be invoked at least once but was never invoked. ' ,
164+ AnInterface::class . ' :: doSomething() was expected to be invoked at least once but was never invoked. ' ,
165165 $ double ,
166166 );
167167 }
@@ -175,7 +175,7 @@ public function testExpectationThatMethodIsCalledAtLeastTwiceFailsWhenMethodIsCa
175175 $ double ->doSomething ();
176176
177177 $ this ->assertThatMockObjectExpectationFails (
178- ' " doSomething()" was expected to be invoked at least 2 times but was invoked once. ' ,
178+ AnInterface::class . ' :: doSomething() was expected to be invoked at least 2 times but was invoked once. ' ,
179179 $ double ,
180180 );
181181 }
@@ -197,7 +197,7 @@ public function testExpectationThatMethodIsCalledTwiceFailsWhenMethodIsNeverCall
197197 $ double ->expects ($ this ->exactly (2 ))->method ('doSomething ' );
198198
199199 $ this ->assertThatMockObjectExpectationFails (
200- ' " doSomething()" was expected to be invoked 2 times but was never invoked. ' ,
200+ AnInterface::class . ' :: doSomething() was expected to be invoked 2 times but was never invoked. ' ,
201201 $ double ,
202202 );
203203 }
@@ -211,7 +211,7 @@ public function testExpectationThatMethodIsCalledTwiceFailsWhenMethodIsCalledOnc
211211 $ double ->doSomething ();
212212
213213 $ this ->assertThatMockObjectExpectationFails (
214- ' " doSomething()" was expected to be invoked 2 times but was invoked once. ' ,
214+ AnInterface::class . ' :: doSomething() was expected to be invoked 2 times but was invoked once. ' ,
215215 $ double ,
216216 );
217217 }
@@ -258,7 +258,7 @@ public function testExpectationThatMethodIsCalledAtMostOnceFailsWhenMethodIsCall
258258 $ double ->doSomething ();
259259
260260 $ this ->assertThatMockObjectExpectationFails (
261- ' " doSomething()" was expected to be invoked at most once but was invoked 2 times. ' ,
261+ AnInterface::class . ' :: doSomething() was expected to be invoked at most once but was invoked 2 times. ' ,
262262 $ double ,
263263 );
264264 }
@@ -274,7 +274,7 @@ public function testExpectationThatMethodIsCalledAtMostTwoTimesFailsWhenMethodIs
274274 $ double ->doSomething ();
275275
276276 $ this ->assertThatMockObjectExpectationFails (
277- ' " doSomething()" was expected to be invoked at most 2 times but was invoked 3 times. ' ,
277+ AnInterface::class . ' :: doSomething() was expected to be invoked at most 2 times but was invoked 3 times. ' ,
278278 $ double ,
279279 );
280280 }
@@ -305,7 +305,7 @@ public function testExpectationThatMethodIsCalledWithParameterFailsWhenMethodIsC
305305
306306 $ this ->assertThatMockObjectExpectationFails (
307307 <<<'EOT'
308- Expectation for " doSomethingElse()" failed.
308+ Expectation for PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration:: doSomethingElse() failed.
309309Parameter $x for invocation PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration::doSomethingElse(0): int does not match expected value.
310310Failed asserting that 0 matches expected 1.
311311EOT,
@@ -334,7 +334,7 @@ public function testExpectationThatMethodIsCalledWithConsecutiveParameterSetsFai
334334 $ double ->doSomethingElse (1 );
335335 $ this ->assertThatMockObjectExpectationFails (
336336 <<<'EOT'
337- Expectation for " doSomethingElse()" failed.
337+ Expectation for PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration:: doSomethingElse() failed.
338338Parameter $x for invocation PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration::doSomethingElse(3): int does not match expected value.
339339Failed asserting that 3 matches expected 2.
340340EOT,
@@ -368,7 +368,7 @@ public function testExpectationThatMethodIsCalledWithConsecutiveParameterSetsFai
368368 $ double ->doSomethingElse (2 );
369369 $ this ->assertThatMockObjectExpectationFails (
370370 <<<'EOT'
371- Expectation for " doSomethingElse()" failed.
371+ Expectation for PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration:: doSomethingElse() failed.
372372Too many parameter sets given, 2 out of 3 expected parameter sets have been called.
373373
374374EOT,
@@ -396,7 +396,7 @@ public function testExpectationThatMethodIsCalledWithParameterSetsInAnyOrderFail
396396 $ double ->doSomethingElse (1 );
397397 $ this ->assertThatMockObjectExpectationFails (
398398 <<<'EOT'
399- Expectation for " doSomethingElse()" failed.
399+ Expectation for PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration:: doSomethingElse() failed.
4004001 out of 2 expected parameter sets was called, index [1] was not called.
401401
402402EOT,
@@ -414,7 +414,7 @@ public function testExpectationThatMethodIsCalledWithParameterSetsInAnyOrderFail
414414 $ double ->doSomethingElse (2 );
415415 $ this ->assertThatMockObjectExpectationFails (
416416 <<<'EOT'
417- Expectation for " doSomethingElse()" failed.
417+ Expectation for PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration:: doSomethingElse() failed.
4184182 out of 3 expected parameter sets were called, index [0] was not called.
419419
420420EOT,
@@ -496,7 +496,7 @@ public function testContingentExpectationsAreEvaluatedWhenTheirConditionIsMet():
496496 $ double ->one ();
497497
498498 $ this ->assertThatMockObjectExpectationFails (
499- ' " two()" was expected to be invoked once but was never invoked. ' ,
499+ InterfaceWithImplicitProtocol::class . ' :: two() was expected to be invoked once but was never invoked. ' ,
500500 $ double ,
501501 );
502502 }
0 commit comments