Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Oct 15, 2023
1 parent e1fc959 commit ae86edc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Common/Command/AbstractUpdateCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,19 @@ public function testOptionNamespace(): void
}
}

public function testIncorrectLimit(): void
{
MigrationHelper::useMigrationsNamespace($this->container);

$command = $this->createCommand($this->container);

$exitCode = $command->execute(['-l' => -1]);
$output = $command->getDisplay(true);

$this->assertSame(Command::INVALID, $exitCode);
$this->assertStringContainsString('[ERROR] The limit argument must be greater than 0.', $output);
}

public function createCommand(ContainerInterface $container): CommandTester
{
return CommandHelper::getCommandTester($container, UpdateCommand::class);
Expand Down

0 comments on commit ae86edc

Please sign in to comment.