From e225a7bfd33f4ff986c9adf1f237a1c9c6b597a4 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 31 Oct 2019 21:27:31 +0100 Subject: [PATCH] fixup! fix tests? Signed-off-by: Roeland Jago Douma --- apps/files_trashbin/tests/TrashbinTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index 590e044b72..3263feb4a9 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -152,7 +152,9 @@ class TrashbinTest extends \Test\TestCase { */ public function testExpireOldFiles() { - $currentTime = time(); + /** @var \OCP\AppFramework\Utility\ITimeFactory $time */ + $time = \OC::$server->query(\OCP\AppFramework\Utility\ITimeFactory::class); + $currentTime = $time->getTime(); $expireAt = $currentTime - 2 * 24 * 60 * 60; $expiredDate = $currentTime - 3 * 24 * 60 * 60;