Test API key creation with custom key

This commit is contained in:
Alejandro Celaya
2023-09-19 10:14:04 +02:00
parent 65a0a90a51
commit f6b1cc7556
7 changed files with 51 additions and 35 deletions

View File

@@ -1,22 +0,0 @@
<?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);
}
}