aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/InitialStateServiceTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/InitialStateServiceTest.php')
-rw-r--r--tests/lib/InitialStateServiceTest.php32
1 files changed, 6 insertions, 26 deletions
diff --git a/tests/lib/InitialStateServiceTest.php b/tests/lib/InitialStateServiceTest.php
index 5af09afb4c0..9081aa93b84 100644
--- a/tests/lib/InitialStateServiceTest.php
+++ b/tests/lib/InitialStateServiceTest.php
@@ -3,24 +3,8 @@
declare(strict_types=1);
/**
- * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test;
@@ -37,7 +21,7 @@ use function json_encode;
class InitialStateServiceTest extends TestCase {
/** @var InitialStateService */
private $service;
- /** @var MockObject|LoggerInterface|(LoggerInterface&MockObject) */
+ /** @var MockObject|LoggerInterface|(LoggerInterface&MockObject) */
protected $logger;
protected function setUp(): void {
@@ -52,7 +36,7 @@ class InitialStateServiceTest extends TestCase {
);
}
- public function staticData(): array {
+ public static function staticData(): array {
return [
['string'],
[23],
@@ -65,9 +49,7 @@ class InitialStateServiceTest extends TestCase {
];
}
- /**
- * @dataProvider staticData
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('staticData')]
public function testStaticData(mixed $value): void {
$this->service->provideInitialState('test', 'key', $value);
$data = $this->service->getInitialStates();
@@ -104,9 +86,7 @@ class InitialStateServiceTest extends TestCase {
);
}
- /**
- * @dataProvider staticData
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('staticData')]
public function testLazyData(mixed $value): void {
$this->service->provideLazyInitialState('test', 'key', function () use ($value) {
return $value;