aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Command/Maintenance/ModeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Core/Command/Maintenance/ModeTest.php')
-rw-r--r--tests/Core/Command/Maintenance/ModeTest.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/Core/Command/Maintenance/ModeTest.php b/tests/Core/Command/Maintenance/ModeTest.php
index 458699649b2..5a9a90b0197 100644
--- a/tests/Core/Command/Maintenance/ModeTest.php
+++ b/tests/Core/Command/Maintenance/ModeTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -67,7 +68,7 @@ class ModeTest extends TestCase {
*
* @return array
*/
- public function getExecuteTestData(): array {
+ public static function getExecuteTestData(): array {
return [
'off -> on' => [
'on', // command option
@@ -111,20 +112,20 @@ class ModeTest extends TestCase {
/**
* Asserts that execute works as expected.
*
- * @dataProvider getExecuteTestData
* @param string $option The command option.
* @param bool $currentMaintenanceState The current maintenance state.
* @param null|bool $expectedMaintenanceState
- * The expected maintenance state. Null for no change.
+ * The expected maintenance state. Null for no change.
* @param string $expectedOutput The expected command output.
* @throws \Exception
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('getExecuteTestData')]
public function testExecute(
string $option,
bool $currentMaintenanceState,
$expectedMaintenanceState,
- string $expectedOutput
- ) {
+ string $expectedOutput,
+ ): void {
$this->config->expects($this->any())
->method('getSystemValueBool')
->willReturn($currentMaintenanceState);