Merge pull request #44614 from nextcloud/backport/44612/stable27

[stable27] fix(tests): Fix tests when daytime saving time change happened recently
This commit is contained in:
Joas Schilling 2024-04-02 15:17:39 +02:00 committed by GitHub
commit 68ec45cef1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1517,6 +1517,7 @@ class ManagerTest extends \Test\TestCase {
$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();
@ -1530,7 +1531,6 @@ class ManagerTest extends \Test\TestCase {
self::invokePrivate($this->manager, 'validateExpirationDateLink', [$share]);
$save->sub(new \DateInterval('P2D'));
$this->assertEquals($save, $share->getExpirationDate());
}