Skip to content

Commit

Permalink
Use dynamic date to avoid out of range on MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Dec 28, 2022
1 parent 2e143a0 commit e5de1e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/tests/Rememberme/PDOStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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();
Expand Down

0 comments on commit e5de1e1

Please sign in to comment.