diff options
Diffstat (limited to 'tests/Core/Command/Config/ImportTest.php')
-rw-r--r-- | tests/Core/Command/Config/ImportTest.php | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/Core/Command/Config/ImportTest.php b/tests/Core/Command/Config/ImportTest.php index 3cce8cb0243..14cdd714d12 100644 --- a/tests/Core/Command/Config/ImportTest.php +++ b/tests/Core/Command/Config/ImportTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -34,7 +35,7 @@ class ImportTest 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 Import($config); } @@ -49,10 +50,9 @@ class ImportTest extends TestCase { } /** - * @dataProvider validateAppsArrayData - * * @param mixed $configValue */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateAppsArrayData')] public function testValidateAppsArray($configValue): void { $this->invokePrivate($this->command, 'validateAppsArray', [['app' => ['name' => $configValue]]]); $this->assertTrue(true, 'Asserting that no exception is thrown'); @@ -68,10 +68,9 @@ class ImportTest extends TestCase { } /** - * @dataProvider validateAppsArrayThrowsData - * * @param mixed $configValue */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateAppsArrayThrowsData')] public function testValidateAppsArrayThrows($configValue): void { try { $this->invokePrivate($this->command, 'validateAppsArray', [['app' => ['name' => $configValue]]]); @@ -98,10 +97,9 @@ class ImportTest extends TestCase { } /** - * @dataProvider checkTypeRecursivelyData - * * @param mixed $configValue */ + #[\PHPUnit\Framework\Attributes\DataProvider('checkTypeRecursivelyData')] public function testCheckTypeRecursively($configValue): void { $this->invokePrivate($this->command, 'checkTypeRecursively', [$configValue, 'name']); $this->assertTrue(true, 'Asserting that no exception is thrown'); @@ -117,10 +115,9 @@ class ImportTest extends TestCase { } /** - * @dataProvider checkTypeRecursivelyThrowsData - * * @param mixed $configValue */ + #[\PHPUnit\Framework\Attributes\DataProvider('checkTypeRecursivelyThrowsData')] public function testCheckTypeRecursivelyThrows($configValue): void { try { $this->invokePrivate($this->command, 'checkTypeRecursively', [$configValue, 'name']); @@ -139,10 +136,9 @@ class ImportTest extends TestCase { } /** - * @dataProvider validateArrayData - * * @param array $configArray */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateArrayData')] public function testValidateArray($configArray): void { $this->invokePrivate($this->command, 'validateArray', [$configArray]); $this->assertTrue(true, 'Asserting that no exception is thrown'); @@ -157,11 +153,11 @@ class ImportTest extends TestCase { } /** - * @dataProvider validateArrayThrowsData * * @param mixed $configArray * @param string $expectedException */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateArrayThrowsData')] public function testValidateArrayThrows($configArray, $expectedException): void { try { $this->invokePrivate($this->command, 'validateArray', [$configArray]); |