mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-26 14:53:48 +03:00
Create InitialApiKeyCommand cli test
This commit is contained in:
parent
ba4a66f772
commit
3d9b48c5fd
1 changed files with 26 additions and 0 deletions
26
module/CLI/test-cli/Command/InitialApiKeyTest.php
Normal file
26
module/CLI/test-cli/Command/InitialApiKeyTest.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ShlinkioCliTest\Shlink\CLI\Command;
|
||||
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use Shlinkio\Shlink\CLI\Command\Api\InitialApiKeyCommand;
|
||||
use Shlinkio\Shlink\TestUtils\CliTest\CliTestCase;
|
||||
|
||||
class InitialApiKeyTest extends CliTestCase
|
||||
{
|
||||
#[Test]
|
||||
public function createsNoKeyWhenOtherApiKeysAlreadyExist(): void
|
||||
{
|
||||
[$output] = $this->exec([InitialApiKeyCommand::NAME, 'new_api_key', '-v']);
|
||||
|
||||
self::assertEquals(
|
||||
<<<OUT
|
||||
Other API keys already exist. Initial API key creation skipped.
|
||||
|
||||
OUT,
|
||||
$output,
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue