Make ReadEnvVarCommand invokable

This commit is contained in:
Alejandro Celaya
2025-11-01 11:38:10 +01:00
parent c34c4e0eea
commit dfef735c89
2 changed files with 16 additions and 19 deletions

View File

@@ -28,13 +28,13 @@ class ReadEnvVarCommandTest extends TestCase
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('foo is not a valid Shlink environment variable');
$this->commandTester->execute(['envVar' => 'foo']);
$this->commandTester->execute(['env-var' => 'foo']);
}
#[Test]
public function valueIsPrintedIfProvidedEnvVarIsValid(): void
{
$this->commandTester->execute(['envVar' => EnvVars::BASE_PATH->value]);
$this->commandTester->execute(['env-var' => EnvVars::BASE_PATH->value]);
$output = $this->commandTester->getDisplay();
self::assertStringNotContainsString('Select the env var to read', $output);