summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/tests
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-07-18 11:21:03 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-08-08 17:03:51 +0200
commit49334e4d9c278d33ce9fd4195b5a12af99821be2 (patch)
tree45ffe11ad48be373ad7a46f4214d285b18a7670e /apps/files_versions/tests
parent48d9c4d2b093e12ec3bf3cd29295da0f2277028f (diff)
downloadnextcloud-server-49334e4d9c278d33ce9fd4195b5a12af99821be2.tar.gz
nextcloud-server-49334e4d9c278d33ce9fd4195b5a12af99821be2.zip
Fix many tests and warnings
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files_versions/tests')
-rw-r--r--apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php b/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
index ca584ae9f53..442a7020d89 100644
--- a/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
+++ b/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
@@ -28,7 +28,6 @@ use OCA\Files_Versions\Expiration;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJobList;
use OCP\IConfig;
-use OCP\ILogger;
use OCP\IUserManager;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
@@ -68,7 +67,12 @@ class ExpireVersionsTest extends TestCase {
$this->expiration->expects($this->never())
->method('getMaxAgeAsTimestamp');
- $job = new ExpireVersions($this->config, $this->userManager, $this->expiration, $this->createMock(ITimeFactory::class));
+ $timeFactory = $this->createMock(ITimeFactory::class);
+ $timeFactory->method('getTime')
+ ->with()
+ ->willReturn(99999999999);
+
+ $job = new ExpireVersions($this->config, $this->userManager, $this->expiration, $timeFactory);
$job->start($this->jobList);
}
}