diff options
Diffstat (limited to 'tests/lib/BackgroundJob/TestJob.php')
-rw-r--r-- | tests/lib/BackgroundJob/TestJob.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/tests/lib/BackgroundJob/TestJob.php b/tests/lib/BackgroundJob/TestJob.php index cc7a4651c4b..ac18530ac7f 100644 --- a/tests/lib/BackgroundJob/TestJob.php +++ b/tests/lib/BackgroundJob/TestJob.php @@ -1,18 +1,18 @@ <?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: 2020-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-or-later */ 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 */ @@ -22,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 ?? \OC::$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; } |