diff --git a/backend/tests/Fakes/FakeClock.php b/backend/tests/Fakes/FakeClock.php index f32d5a4..f112836 100644 --- a/backend/tests/Fakes/FakeClock.php +++ b/backend/tests/Fakes/FakeClock.php @@ -4,12 +4,18 @@ namespace Tests\Fakes; use App\Auth\Clock; use DateTimeImmutable; -use DateTimeZone; class FakeClock implements Clock { + public function __construct(private DateTimeImmutable $currentTime) {} + public function now(): DateTimeImmutable { - return new DateTimeImmutable('2026-05-18 12:00:00', new DateTimeZone('UTC')); + return $this->currentTime; + } + + public function setTime(DateTimeImmutable $newTime): void + { + $this->currentTime = $newTime; } }