mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-24 09:50:17 -06:00
23 lines
596 B
PHP
23 lines
596 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace ShlinkioCliTest\Shlink\CLI\Command;
|
|
|
|
use PHPUnit\Framework\Attributes\Test;
|
|
use Shlinkio\Shlink\CLI\Command\Api\GenerateKeyCommand;
|
|
use Shlinkio\Shlink\CLI\Util\ExitCode;
|
|
use Shlinkio\Shlink\TestUtils\CliTest\CliTestCase;
|
|
|
|
class GenerateApiKeyTest extends CliTestCase
|
|
{
|
|
#[Test]
|
|
public function outputIsCorrect(): void
|
|
{
|
|
[$output, $exitCode] = $this->exec([GenerateKeyCommand::NAME]);
|
|
|
|
self::assertStringContainsString('[OK] Generated API key', $output);
|
|
self::assertEquals(ExitCode::EXIT_SUCCESS, $exitCode);
|
|
}
|
|
}
|