mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Fixed unit tests for password_renewed_date, broken by the correction of
n°4095.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user