Skip to content

Commit

Permalink
Merge pull request #44614 from nextcloud/backport/44612/stable27
Browse files Browse the repository at this point in the history
[stable27] fix(tests): Fix tests when daytime saving time change happened recently
  • Loading branch information
nickvergessen authored Apr 2, 2024
2 parents f59aa61 + 606f258 commit 68ec45c
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 68ec45c

Please sign in to comment.