Use invokable commands approach on some API console commands

This commit is contained in:
Alejandro Celaya
2025-06-26 08:32:45 +02:00
parent c2743cb488
commit 850e8574e9
6 changed files with 82 additions and 103 deletions

View File

@@ -35,7 +35,7 @@ class DisableKeyCommandTest extends TestCase
$this->apiKeyService->expects($this->never())->method('disableByName');
$exitCode = $this->commandTester->execute([
'keyOrName' => $apiKey,
'key-or-name' => $apiKey,
]);
$output = $this->commandTester->getDisplay();
@@ -51,7 +51,7 @@ class DisableKeyCommandTest extends TestCase
$this->apiKeyService->expects($this->never())->method('disableByKey');
$exitCode = $this->commandTester->execute([
'keyOrName' => $name,
'key-or-name' => $name,
'--by-name' => true,
]);
$output = $this->commandTester->getDisplay();
@@ -71,7 +71,7 @@ class DisableKeyCommandTest extends TestCase
$this->apiKeyService->expects($this->never())->method('disableByName');
$exitCode = $this->commandTester->execute([
'keyOrName' => $apiKey,
'key-or-name' => $apiKey,
]);
$output = $this->commandTester->getDisplay();
@@ -90,7 +90,7 @@ class DisableKeyCommandTest extends TestCase
$this->apiKeyService->expects($this->never())->method('disableByKey');
$exitCode = $this->commandTester->execute([
'keyOrName' => $name,
'key-or-name' => $name,
'--by-name' => true,
]);
$output = $this->commandTester->getDisplay();