Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(tests): Fix tests when daytime saving time change happened recently
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc authored and backportbot[bot] committed Apr 2, 2024
commit 606f25871e0e101ae73b37b319de3c8282950b20
2 changes: 1 addition & 1 deletion tests/lib/Share20/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,7 @@ public function testValidateExpirationDateHookModification() {

$save = clone $nextWeek;
$save->setTime(0, 0);
$save->sub(new \DateInterval('P2D'));
$save->setTimezone(new \DateTimeZone(date_default_timezone_get()));

$hookListener = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
Expand All @@ -1530,7 +1531,6 @@ public function testValidateExpirationDateHookModification() {

self::invokePrivate($this->manager, 'validateExpirationDateLink', [$share]);

$save->sub(new \DateInterval('P2D'));
$this->assertEquals($save, $share->getExpirationDate());
}

Expand Down