aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/BackgroundJob/TestParallelAwareJob.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/BackgroundJob/TestParallelAwareJob.php')
-rw-r--r--tests/lib/BackgroundJob/TestParallelAwareJob.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/lib/BackgroundJob/TestParallelAwareJob.php b/tests/lib/BackgroundJob/TestParallelAwareJob.php
index 480762a2709..6efb1a1fd8d 100644
--- a/tests/lib/BackgroundJob/TestParallelAwareJob.php
+++ b/tests/lib/BackgroundJob/TestParallelAwareJob.php
@@ -1,18 +1,17 @@
<?php
+
/**
- * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
+ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\BackgroundJob;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\Job;
+use OCP\Server;
-class TestParallelAwareJob extends \OCP\BackgroundJob\Job {
- private $testCase;
-
+class TestParallelAwareJob extends Job {
/**
* @var callable $callback
*/
@@ -22,10 +21,13 @@ class TestParallelAwareJob extends \OCP\BackgroundJob\Job {
* @param JobTest $testCase
* @param callable $callback
*/
- public function __construct(?ITimeFactory $time = null, $testCase = null, $callback = null) {
- parent::__construct($time ?? \OC::$server->get(ITimeFactory::class));
+ public function __construct(
+ ?ITimeFactory $time = null,
+ private $testCase = null,
+ $callback = null,
+ ) {
+ parent::__construct($time ?? Server::get(ITimeFactory::class));
$this->setAllowParallelRuns(false);
- $this->testCase = $testCase;
$this->callback = $callback;
}