diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index dc122826ef917..da173dc2e1fe2 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -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(); @@ -1549,7 +1550,6 @@ public function testValidateExpirationDateHookModification() { self::invokePrivate($this->manager, 'validateExpirationDateLink', [$share]); - $save->sub(new \DateInterval('P2D')); $this->assertEquals($save, $share->getExpirationDate()); }