aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/tests
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-06-28 12:55:26 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-08-08 17:03:19 +0200
commit48d9c4d2b093e12ec3bf3cd29295da0f2277028f (patch)
treed66f1d2f54e8ae745fc7ce7bf067ce2072eeac6a /apps/files_versions/tests
parent19a2d6f6e7d54eb9318279809bf6c3f40bf566e2 (diff)
downloadnextcloud-server-48d9c4d2b093e12ec3bf3cd29295da0f2277028f.tar.gz
nextcloud-server-48d9c4d2b093e12ec3bf3cd29295da0f2277028f.zip
Port existing server code to new interface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files_versions/tests')
-rw-r--r--apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php b/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
index a1acffb8543..ca584ae9f53 100644
--- a/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
+++ b/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
@@ -25,6 +25,7 @@ namespace OCA\Files_Versions\Tests\BackgroundJob;
use OCA\Files_Versions\BackgroundJob\ExpireVersions;
use OCA\Files_Versions\Expiration;
+use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJobList;
use OCP\IConfig;
use OCP\ILogger;
@@ -46,9 +47,6 @@ class ExpireVersionsTest extends TestCase {
/** @var IJobList|MockObject */
private $jobList;
- /** @var ILogger|MockObject */
- private $logger;
-
protected function setUp(): void {
parent::setUp();
@@ -56,7 +54,6 @@ class ExpireVersionsTest extends TestCase {
$this->userManager = $this->createMock(IUserManager::class);
$this->expiration = $this->createMock(Expiration::class);
$this->jobList = $this->createMock(IJobList::class);
- $this->logger = $this->createMock(ILogger::class);
$this->jobList->expects($this->once())
->method('setLastRun');
@@ -71,7 +68,7 @@ class ExpireVersionsTest extends TestCase {
$this->expiration->expects($this->never())
->method('getMaxAgeAsTimestamp');
- $job = new ExpireVersions($this->config, $this->userManager, $this->expiration);
- $job->execute($this->jobList, $this->logger);
+ $job = new ExpireVersions($this->config, $this->userManager, $this->expiration, $this->createMock(ITimeFactory::class));
+ $job->start($this->jobList);
}
}