Skip to content

Commit

Permalink
Merge pull request #1307 from cpats007/successful-output-message-for-…
Browse files Browse the repository at this point in the history
…execute-command

Successful output message for execute command
  • Loading branch information
greg0ire committed Feb 15, 2023
2 parents 71b766e + f2dfcfd commit e542ad8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Expand Up @@ -19,6 +19,7 @@
use function is_string;
use function is_writable;
use function sprintf;
use function strtoupper;

/**
* The ExecuteCommand class is responsible for executing migration versions up or down manually.
Expand Down Expand Up @@ -161,6 +162,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$writer->write($path, $direction, $sql);
}

$this->io->success(sprintf(
'Successfully migrated version(s) : %s : [%s]',
implode(', ', $versions),
strtoupper($plan->getDirection())
));
$this->io->newLine();

return 0;
Expand Down
Expand Up @@ -118,6 +118,7 @@ public function testExecute(): void

self::assertSame(0, $this->executeCommandTester->getStatusCode());
self::assertStringContainsString('[notice] Executing 1 up', trim($this->executeCommandTester->getDisplay(true)));
self::assertStringContainsString('[OK] Successfully migrated version(s) : 1 : [UP]', trim($this->executeCommandTester->getDisplay(true)));
}

public function testExecuteMultiple(): void
Expand Down

0 comments on commit e542ad8

Please sign in to comment.