N°8129 - Dont crash if date/time default value has a bad format

This commit is contained in:
XGUI
2025-01-29 11:08:21 +01:00
parent 72e0750c1b
commit 9e3f99a150
4 changed files with 134 additions and 54 deletions

View File

@@ -1492,6 +1492,15 @@ abstract class ItopDataTestCase extends ItopTestCase
$this->assertEquals(1, $oSet->Count(), $sMessage);
}
/**
* @since 3.2.1
*/
protected function AssertLastErrorLogEntryContains(string $sNeedle, string $sMessage = ''): void
{
$aLastLines = self::ReadTail(APPROOT.'/log/error.log');
$this->assertStringContainsString($sNeedle, $aLastLines[0], $sMessage);
}
static protected function StartStopwatchInThePast(DBObject $oObject, string $sStopwatchAttCode, int $iDelayInSecond)
{
$iStartDate = time() - $iDelayInSecond;