diff options
Diffstat (limited to 'tests/Core/Command/Encryption/DisableTest.php')
-rw-r--r-- | tests/Core/Command/Encryption/DisableTest.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/Core/Command/Encryption/DisableTest.php b/tests/Core/Command/Encryption/DisableTest.php index 6c962399e11..a89fd636e47 100644 --- a/tests/Core/Command/Encryption/DisableTest.php +++ b/tests/Core/Command/Encryption/DisableTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -33,12 +34,12 @@ class DisableTest extends TestCase { $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); - /** @var \OCP\IConfig $config */ + /** @var IConfig $config */ $this->command = new Disable($config); } - public function dataDisable() { + public static function dataDisable(): array { return [ ['yes', true, 'Encryption disabled'], ['no', false, 'Encryption is already disabled'], @@ -46,13 +47,13 @@ class DisableTest extends TestCase { } /** - * @dataProvider dataDisable * * @param string $oldStatus * @param bool $isUpdating * @param string $expectedString */ - public function testDisable($oldStatus, $isUpdating, $expectedString) { + #[\PHPUnit\Framework\Attributes\DataProvider('dataDisable')] + public function testDisable($oldStatus, $isUpdating, $expectedString): void { $this->config->expects($this->once()) ->method('getAppValue') ->with('core', 'encryption_enabled', $this->anything()) |