@@ -65,7 +65,7 @@ public function expect(string $method, array $arguments, mixed $returns = null,
6565 public function assertExpectationsMet (): void
6666 {
6767 if (!empty ($ this ->expectations )) {
68- $ this ->testCase ->fail (sprintf ('StaticMethodMock not all expectations met for %s, %d remaining ' , $ this ->className , count ($ this ->expectations )));
68+ $ this ->testCase ->fail (sprintf ('Not all expectations met for %s, %d remaining ' , $ this ->className , count ($ this ->expectations )));
6969 }
7070 }
7171
@@ -81,15 +81,15 @@ public function assertExpectationsMet(): void
8181 public static function handleStaticCall (string $ className , string $ method , array $ arguments ): mixed
8282 {
8383 if (!isset (self ::$ mocks [$ className ])) {
84- throw new Exception (sprintf ('StaticMethodMock no mock registered for class: %s ' , $ className ));
84+ throw new Exception (sprintf ('No mock registered for class: %s ' , $ className ));
8585 }
8686 $ mock = self ::$ mocks [$ className ];
8787 if (empty ($ mock ->expectations )) {
88- $ mock ->testCase ->fail (sprintf ('StaticMethodMock no expectations left for %s::%s ' , $ className , $ method ));
88+ $ mock ->testCase ->fail (sprintf ('No expectations left for %s::%s ' , $ className , $ method ));
8989 }
9090 $ expected = array_shift ($ mock ->expectations );
91- $ mock ->testCase ->assertEquals ($ expected ['method ' ], strtoupper ($ method ), sprintf ('StaticMethodMock method mismatch for %s::%s ' , $ className , $ method ));
92- $ mock ->testCase ->assertEquals ($ expected ['arguments ' ], $ arguments , sprintf ('StaticMethodMock arguments mismatch for %s::%s ' , $ className , $ method ));
91+ $ mock ->testCase ->assertEquals ($ expected ['method ' ], strtoupper ($ method ), sprintf ('Method mismatch for %s::%s ' , $ className , $ method ));
92+ $ mock ->testCase ->assertEquals ($ expected ['arguments ' ], $ arguments , sprintf ('Arguments mismatch for %s::%s ' , $ className , $ method ));
9393 if ($ expected ['exception ' ] !== null ) {
9494 throw $ expected ['exception ' ];
9595 }
0 commit comments