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