From 851152fadb2912e9f522e2dbfab3a09aa488c10d Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Wed, 25 Oct 2023 20:45:04 +0330 Subject: [PATCH] tests: refactor test by rector 0.18.6 --- tests/Authentication/Filters/SessionFilterTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Authentication/Filters/SessionFilterTest.php b/tests/Authentication/Filters/SessionFilterTest.php index a217d7a74..8a0769e59 100644 --- a/tests/Authentication/Filters/SessionFilterTest.php +++ b/tests/Authentication/Filters/SessionFilterTest.php @@ -4,6 +4,7 @@ namespace Tests\Authentication\Filters; +use CodeIgniter\I18n\Time; use CodeIgniter\Shield\Filters\SessionAuth; use CodeIgniter\Shield\Models\UserModel; use CodeIgniter\Test\DatabaseTestTrait; @@ -43,7 +44,7 @@ public function testFilterSuccess(): void $this->assertSame($user->id, auth('session')->id()); $this->assertSame($user->id, auth('session')->user()->id); // Last Active should have been updated - $this->assertNotEmpty(auth('session')->user()->last_active); + $this->assertInstanceOf(Time::class, auth('session')->user()->last_active); } public function testRecordActiveDate(): void