Skip to content

Commit

Permalink
ListCommand: explain is more #colorful and space-y
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Apr 7, 2024
1 parent 5b6bf70 commit 93ef368
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Command/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$explain,
);

$output->writeln(' ' . $explainedExpression);
$output->writeln(" <fg=#57534E>$explainedExpression</>");
$output->writeln('');
}
}

Expand Down
12 changes: 8 additions & 4 deletions tests/Unit/Command/ListCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,17 @@ public function testExplain(): void
self::assertSame(
$explainDefault = <<<'MSG'
* * * * * [0] Tests\Orisai\Scheduler\Doubles\CallbackList::job1() Next Due: 59 seconds
At every minute.
At every minute.
*/30 7-15 * * 1-5 (America/New_York) [1] Tests\Orisai\Scheduler\Doubles\CallbackList::job1() Next Due: 5 hours
At every 30th minute past every hour from 7 through 15 on every day-of-week from Monday through Friday in America/New_York time zone.
At every 30th minute past every hour from 7 through 15 on every day-of-week from Monday through Friday in America/New_York time zone.
* * * 4 * / 10 [2] Tests\Orisai\Scheduler\Doubles\CallbackList::__invoke() Next Due: 2 months
At every 10 seconds in April.
At every 10 seconds in April.
* * * 3 * / 15 (America/New_York) [3] Tests\Orisai\Scheduler\Doubles\CallbackList::__invoke() Next Due: 1 month
At every 15 seconds in March in America/New_York time zone.
At every 15 seconds in March in America/New_York time zone.


MSG,
CommandOutputHelper::getCommandOutput($tester),
Expand Down

0 comments on commit 93ef368

Please sign in to comment.