From a681d93f5d157f2994a6b711b4ee8713a2423e3e Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Sun, 17 May 2026 10:06:35 +0300 Subject: [PATCH] fix: use stub instead of mock for unused handler PHPUnit 13 warns about mock objects with no expectations. createStub() avoids the notice since the handler is never called in the expired-session test. --- backend/tests/Unit/Middleware/AuthMiddlewareTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/tests/Unit/Middleware/AuthMiddlewareTest.php b/backend/tests/Unit/Middleware/AuthMiddlewareTest.php index eefa63c..9d2ae69 100644 --- a/backend/tests/Unit/Middleware/AuthMiddlewareTest.php +++ b/backend/tests/Unit/Middleware/AuthMiddlewareTest.php @@ -125,7 +125,7 @@ class AuthMiddlewareTest extends TestCase ); $request = $this->createRequestWithCookie('valid-token'); - $handler = $this->createMock(RequestHandlerInterface::class); + $handler = $this->createStub(RequestHandlerInterface::class); $this->middleware->process($request, $handler);