From 43e0643a66626fa072363d82a055c06993d5bd30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 10 Apr 2020 09:09:31 +0200 Subject: [PATCH] EZP-31012: Fixed assertion for passwordUpdateAt value in eZ\Publish\API\Repository\Tests\UserServiceTest::testUpdateUserUpdatesExpectedProperties (#45) --- eZ/Publish/API/Repository/Tests/UserServiceTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eZ/Publish/API/Repository/Tests/UserServiceTest.php b/eZ/Publish/API/Repository/Tests/UserServiceTest.php index f44e6b2cc8..e111d50eae 100644 --- a/eZ/Publish/API/Repository/Tests/UserServiceTest.php +++ b/eZ/Publish/API/Repository/Tests/UserServiceTest.php @@ -1792,9 +1792,9 @@ public function testUpdateUserUpdatesExpectedProperties(User $user) // Make sure passwordUpdatedAt field has been updated together with password $this->assertNotNull($user->passwordUpdatedAt); - $this->assertEquals( - (new DateTime())->format('Y-m-d H:i'), - $user->passwordUpdatedAt->format('Y-m-d H:i') + $this->assertGreaterThanOrEqual( + $user->getVersionInfo()->modificationDate->getTimestamp(), + $user->passwordUpdatedAt->getTimestamp() ); }