From 51537bbf247f104d15917473a1e67b3c77fed2cd Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Tue, 19 May 2026 19:57:57 +0300 Subject: [PATCH] change testcase import, add datetime to fake clock, style lines --- .../tests/Unit/Auth/UseCases/CreateSessionTest.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/backend/tests/Unit/Auth/UseCases/CreateSessionTest.php b/backend/tests/Unit/Auth/UseCases/CreateSessionTest.php index d6368f2..0367f1c 100644 --- a/backend/tests/Unit/Auth/UseCases/CreateSessionTest.php +++ b/backend/tests/Unit/Auth/UseCases/CreateSessionTest.php @@ -6,10 +6,11 @@ use App\Auth\Clock; use App\Auth\UseCases\CreateSession\CreateSession; use App\Shared\ValueObject\EmailAddress; use App\User\User; -use PHPUnit\Framework\TestCase; +use DateTimeImmutable; use Tests\Fakes\FakeClock; use Tests\Fakes\FakeSessionRepository; use Tests\Fakes\FakeTokenGenerator; +use Tests\TestCase; class CreateSessionTest extends TestCase { @@ -22,9 +23,15 @@ class CreateSessionTest extends TestCase { $this->sessionRepo = new FakeSessionRepository(); $this->tokenGenerator = new FakeTokenGenerator(); - $this->clock = new FakeClock(); + $this->clock = new FakeClock( + new DateTimeImmutable('2026-05-18 12:00:00') + ); - $this->createSession = new CreateSession($this->sessionRepo, $this->tokenGenerator, $this->clock); + $this->createSession = new CreateSession( + $this->sessionRepo, + $this->tokenGenerator, + $this->clock + ); } public function testCreatesSessionForUser(): void