From bb5679959ede8ae2477eb28e5d7c9e06bf6c6861 Mon Sep 17 00:00:00 2001 From: "denis.flaven@combodo.com" Date: Tue, 10 Aug 2021 10:40:37 +0200 Subject: [PATCH] =?UTF-8?q?Fixed=20unit=20tests=20for=20password=5Frenewed?= =?UTF-8?q?=5Fdate,=20broken=20by=20the=20correction=20of=20n=C2=B04095.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/coreExtensions/UserLocalTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/coreExtensions/UserLocalTest.php b/test/coreExtensions/UserLocalTest.php index b780505cc..72585568d 100644 --- a/test/coreExtensions/UserLocalTest.php +++ b/test/coreExtensions/UserLocalTest.php @@ -275,6 +275,7 @@ class UserLocalTest extends ItopDataTestCase public function testPasswordRenewal($sBefore, $sExpectedAfter) { $oBefore = is_null($sBefore) ? null : date(\AttributeDate::GetInternalFormat(), strtotime($sBefore)); + $oNow = date(\AttributeDate::GetInternalFormat()); $oExpectedAfter = is_null($sExpectedAfter) ? null : date(\AttributeDate::GetInternalFormat(), strtotime($sExpectedAfter)); $aUserLocalValues = array('login' => 'john'); @@ -298,7 +299,7 @@ class UserLocalTest extends ItopDataTestCase //INSERT $oUserLocal->Set('password', 'fooBar1???'); $oUserLocal->DBWrite(); - $this->assertEquals($oBefore, $oUserLocal->Get('password_renewed_date'), 'INSERT changes the "password_renewed_date"'); + $this->assertEquals($oNow, $oUserLocal->Get('password_renewed_date'), 'INSERT sets the "password_renewed_date" to the current date'); //UPDATE password_renewed_date $oUserLocal->Set('password_renewed_date', $oBefore);