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.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/Core/Command/Maintenance/ModeTest.php b/tests/Core/Command/Maintenance/ModeTest.php
index 1e8af354d50..5a9a90b0197 100644
--- a/tests/Core/Command/Maintenance/ModeTest.php
+++ b/tests/Core/Command/Maintenance/ModeTest.php
@@ -1,5 +1,9 @@
<?php
+/**
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
namespace Tests\Core\Command\Maintenance;
use OC\Core\Command\Maintenance\Mode;
@@ -64,7 +68,7 @@ class ModeTest extends TestCase {
*
* @return array
*/
- public function getExecuteTestData(): array {
+ public static function getExecuteTestData(): array {
return [
'off -> on' => [
'on', // command option
@@ -108,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);