N°7858 Typo in backup config causing wrong scheduling of first occurrence of weekly backup (if on the same day as first execution)

This commit is contained in:
Romain Quetiez
2024-09-27 16:47:32 +02:00
parent 380512dcbe
commit 5ae2fdee94
2 changed files with 7 additions and 0 deletions

View File

@@ -104,6 +104,12 @@ class WeeklyScheduledProcessTest extends ItopTestCase
$oWeeklyImpl->InterpretWeekDays();
}
public function testTimeConfigShouldBeTrimmed()
{
$oWeeklyImpl = new \WeeklyScheduledProcessMockConfig(true, ' 22:33 ', 'monday');
$this->assertEquals(new DateTime('2020-05-11 22:33:00'), $oWeeklyImpl->GetNextOccurrence('2020-05-11 21:00'));
}
public function testTimeConfigSecondsShouldBeIgnored()
{
$oWeeklyImpl = new \WeeklyScheduledProcessMockConfig(true, '22:33:44.123', 'monday');