return utc from clock

This commit is contained in:
Yisroel Baum 2026-04-26 10:32:08 +03:00
parent 2fe41a5fe7
commit 13da7c311a
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
5 changed files with 26 additions and 9 deletions

View file

@ -72,7 +72,7 @@ class AuthMiddlewareTest extends TestCase
private function makeHandler(): RequestHandlerInterface
{
return new class() implements RequestHandlerInterface {
return new class implements RequestHandlerInterface {
public ?ServerRequestInterface $capturedRequest = null;
public function handle(
@ -113,8 +113,8 @@ class AuthMiddlewareTest extends TestCase
$this->sessionRepo->create(new CreateSessionDto(
token: 'expired-token',
userId: $this->user->getId(),
createdAt: new DateTimeImmutable('2024-12-01'),
expiresAt: new DateTimeImmutable('2024-12-08'),
createdAt: new DateTimeImmutable('2024-12-01T00:00:00+00:00'),
expiresAt: new DateTimeImmutable('2024-12-08T00:00:00+00:00'),
));
$response = $this->middleware->process(
@ -130,8 +130,8 @@ class AuthMiddlewareTest extends TestCase
$this->sessionRepo->create(new CreateSessionDto(
token: 'valid-token',
userId: $this->user->getId(),
createdAt: new DateTimeImmutable('2025-01-01'),
expiresAt: new DateTimeImmutable('2025-01-08'),
createdAt: new DateTimeImmutable('2025-01-01T00:00:00+00:00'),
expiresAt: new DateTimeImmutable('2025-01-08T00:00:00+00:00'),
));
$handler = $this->makeHandler();