aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/BackgroundJob/TimedJobTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/BackgroundJob/TimedJobTest.php')
-rw-r--r--tests/lib/BackgroundJob/TimedJobTest.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/lib/BackgroundJob/TimedJobTest.php b/tests/lib/BackgroundJob/TimedJobTest.php
index ad0f54ebe4a..d56240eb75e 100644
--- a/tests/lib/BackgroundJob/TimedJobTest.php
+++ b/tests/lib/BackgroundJob/TimedJobTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -8,20 +9,7 @@
namespace Test\BackgroundJob;
use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\BackgroundJob\TimedJob;
-
-class TestTimedJobNew extends TimedJob {
- public bool $ran = false;
-
- public function __construct(ITimeFactory $timeFactory) {
- parent::__construct($timeFactory);
- $this->setInterval(10);
- }
-
- public function run($argument) {
- $this->ran = true;
- }
-}
+use OCP\Server;
class TimedJobTest extends \Test\TestCase {
private DummyJobList $jobList;
@@ -31,7 +19,7 @@ class TimedJobTest extends \Test\TestCase {
parent::setUp();
$this->jobList = new DummyJobList();
- $this->time = \OCP\Server::get(ITimeFactory::class);
+ $this->time = Server::get(ITimeFactory::class);
}
public function testShouldRunAfterIntervalNew(): void {