aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Command/Config/App/GetConfigTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Core/Command/Config/App/GetConfigTest.php')
-rw-r--r--tests/Core/Command/Config/App/GetConfigTest.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/Core/Command/Config/App/GetConfigTest.php b/tests/Core/Command/Config/App/GetConfigTest.php
index 89a75c0b527..13392cddf55 100644
--- a/tests/Core/Command/Config/App/GetConfigTest.php
+++ b/tests/Core/Command/Config/App/GetConfigTest.php
@@ -9,6 +9,7 @@ declare(strict_types=1);
namespace Tests\Core\Command\Config\App;
+use OC\Config\ConfigManager;
use OC\Core\Command\Config\App\GetConfig;
use OCP\Exceptions\AppConfigUnknownKeyException;
use OCP\IAppConfig;
@@ -20,6 +21,7 @@ use Test\TestCase;
class GetConfigTest extends TestCase {
protected IAppConfig&MockObject $appConfig;
+ protected ConfigManager&MockObject $configManager;
protected InputInterface&MockObject $consoleInput;
protected OutputInterface&MockObject $consoleOutput;
protected Command $command;
@@ -28,10 +30,11 @@ class GetConfigTest extends TestCase {
parent::setUp();
$this->appConfig = $this->createMock(IAppConfig::class);
+ $this->configManager = $this->createMock(ConfigManager::class);
$this->consoleInput = $this->createMock(InputInterface::class);
$this->consoleOutput = $this->createMock(OutputInterface::class);
- $this->command = new GetConfig($this->appConfig);
+ $this->command = new GetConfig($this->appConfig, $this->configManager);
}
@@ -77,9 +80,7 @@ class GetConfigTest extends TestCase {
];
}
- /**
- * @dataProvider dataGet
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataGet')]
public function testGet(string $configName, mixed $value, bool $configExists, mixed $defaultValue, bool $hasDefault, string $outputFormat, int $expectedReturn, ?string $expectedMessage): void {
if (!$expectedReturn) {
if ($configExists) {