aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/BackgroundJob/TestJob.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/BackgroundJob/TestJob.php')
-rw-r--r--tests/lib/BackgroundJob/TestJob.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/lib/BackgroundJob/TestJob.php b/tests/lib/BackgroundJob/TestJob.php
index ea0634e63d9..ac18530ac7f 100644
--- a/tests/lib/BackgroundJob/TestJob.php
+++ b/tests/lib/BackgroundJob/TestJob.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2020-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -8,10 +9,10 @@
namespace Test\BackgroundJob;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\Job;
+use OCP\Server;
-class TestJob extends \OCP\BackgroundJob\Job {
- private $testCase;
-
+class TestJob extends Job {
/**
* @var callable $callback
*/
@@ -21,9 +22,12 @@ class TestJob extends \OCP\BackgroundJob\Job {
* @param JobTest $testCase
* @param callable $callback
*/
- public function __construct(?ITimeFactory $time = null, $testCase = null, $callback = null) {
- parent::__construct($time ?? \OCP\Server::get(ITimeFactory::class));
- $this->testCase = $testCase;
+ public function __construct(
+ ?ITimeFactory $time = null,
+ private $testCase = null,
+ $callback = null,
+ ) {
+ parent::__construct($time ?? Server::get(ITimeFactory::class));
$this->callback = $callback;
}