This commit is contained in:
@ -40,6 +40,20 @@ final class CommandBackupTest extends \PHPUnit\Framework\TestCase
|
||||
$this->assertStringContainsString('[ERROR] Configuration error:File "bad_file" does not exist.', $output);
|
||||
}
|
||||
|
||||
public function testNoCommand(): void
|
||||
{
|
||||
$applicationd = new Application('backup', "1.1.1");
|
||||
|
||||
$applicationd->add(new CommandBackup());
|
||||
|
||||
|
||||
$command = $applicationd->find('backup');
|
||||
$commandTester = new CommandTester($command);
|
||||
$this->expectException(\Exception::class);
|
||||
$commandTester->execute([]);
|
||||
$this->fail('Exception was not thrown');
|
||||
}
|
||||
|
||||
public function testGoodConfig(): void
|
||||
{
|
||||
$applicationd = new Application('backup', "1.1.1");
|
||||
|
Reference in New Issue
Block a user