Use DatetimeImmutable instead of DateTime wherever possible

This commit is contained in:
Jan Böhmer 2024-06-22 17:36:54 +02:00
parent eebc373734
commit 235d572f8c
39 changed files with 222 additions and 112 deletions

View file

@ -73,7 +73,7 @@ class UserTest extends TestCase
$codes = ['test', 'invalid', 'test'];
$user->setBackupCodes($codes);
// Backup Codes generation date must be changed!
$this->assertInstanceOf(\DateTime::class, $user->getBackupCodesGenerationDate());
$this->assertNotNull($user->getBackupCodesGenerationDate());
$this->assertSame($codes, $user->getBackupCodes());
//Test what happens if we delete the backup keys