From e5de1e12d8045dd0b9319d3890f176268c21a5e1 Mon Sep 17 00:00:00 2001 From: Louis Charette Date: Tue, 27 Dec 2022 21:36:59 -0500 Subject: [PATCH] Use dynamic date to avoid out of range on MySQL --- app/tests/Rememberme/PDOStorageTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/tests/Rememberme/PDOStorageTest.php b/app/tests/Rememberme/PDOStorageTest.php index 1a3c15d..038ccdd 100644 --- a/app/tests/Rememberme/PDOStorageTest.php +++ b/app/tests/Rememberme/PDOStorageTest.php @@ -44,7 +44,8 @@ class PDOStorageTest extends AccountTestCase protected string $validDBPersistentToken = 'd27d330764ef61e99adf5d16f90b95a2a63c209a'; protected string $invalidDBToken = 'ec15fbc40cdff6a2050a1bcbbc1b2196222f13f4'; - protected string $expire = '2122-12-21 21:21:00'; + // Expiration date for the test tokens + protected string $expire; protected function setUp(): void { @@ -53,6 +54,9 @@ protected function setUp(): void // Setup test database $this->refreshDatabase(); + // Set dynamic date (can't be done in property declaration) + $this->expire = Carbon::now()->addYear(); + // Create a test user /** @var UserInterface */ $user = User::factory()->create();