Skip to content

Commit

Permalink
Merge pull request #44612 from nextcloud/fix/fix-share-manager-tests-…
Browse files Browse the repository at this point in the history
…near-daytime-change

fix(tests): Fix tests when daytime saving time change happened recently
  • Loading branch information
come-nc authored Apr 2, 2024
2 parents 31c6379 + fda1c42 commit e05ed23
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 @@ -1536,6 +1536,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 @@ -1549,7 +1550,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 e05ed23

Please sign in to comment.