Created first CLI E2E tests

This commit is contained in:
Alejandro Celaya
2022-02-13 12:20:02 +01:00
parent 79af315b9f
commit 9e32886f60
7 changed files with 128 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace ShlinkioCliTest\Shlink\CLI\Command;
use Shlinkio\Shlink\CLI\Command\Api\GenerateKeyCommand;
use Shlinkio\Shlink\CLI\Util\ExitCodes;
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(ExitCodes::EXIT_SUCCESS, $exitCode);
}
}