From 9593edc35eba735eb832298ee3c249c8c9956ed6 Mon Sep 17 00:00:00 2001 From: Arnold Daniels Date: Mon, 1 Feb 2021 00:44:08 +0100 Subject: [PATCH] Test DateTime to DateTimeImmutable conversion of `JWT::persist()`. --- tests/Session/JwtTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Session/JwtTest.php b/tests/Session/JwtTest.php index 32d0724..56b7a2a 100644 --- a/tests/Session/JwtTest.php +++ b/tests/Session/JwtTest.php @@ -116,7 +116,7 @@ public function testGetInfoDefaults() public function testPersist() { - $timestamp = new \DateTimeImmutable('2020-01-01T00:00:00+00:00'); + $timestamp = new \DateTime('2020-01-01T00:00:00+00:00'); // Should convert to DateTimeImmutable $cookie = new CookieValue(); $this->jwt = $this->jwt->withCookie($cookie); @@ -157,7 +157,7 @@ public function testClear() public function testTtl() { - $timestamp = new \DateTimeImmutable('2020-01-01T00:00:00+00:00'); + $timestamp = new \DateTime('2020-01-01T00:00:00+00:00'); // Should convert to DateTimeImmutable $cookie = new CookieValue(); $this->jwt = $this->jwt