Skip to content

Commit

Permalink
improve formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Aug 5, 2017
1 parent d0a0be9 commit 3657b28
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `phpunit-watcher` will be documented in this file

## 1.3.1 - 2017-08-05

- improved readability of manual

## 1.3.0 - 2017-08-05

- added desktop notifications
Expand Down
2 changes: 1 addition & 1 deletion src/ConsoleApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ConsoleApplication extends Application
{
public function __construct()
{
parent::__construct('PHPUnit Watcher', '1.3.0');
parent::__construct('PHPUnit Watcher', '1.3.1');

$this->add(new WatcherCommand());
}
Expand Down
10 changes: 5 additions & 5 deletions src/Screens/Phpunit.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ protected function displayManual()
{
$this->terminal
->emptyLine()
->write('Press a to run all tests.')
->write('Press t to filter by test name.')
->write('Press p to filter by file name.')
->write('Press q to quit the watcher.')
->write('Press Enter to trigger a test run.');
->write('<dim>Press </dim>a<dim> to run all tests.</dim>')
->write('<dim>Press </dim>t<dim> to filter by test name.</dim>')
->write('<dim>Press </dim>p<dim> to filter by file name.</dim>')
->write('<dim>Press </dim>q<dim> to quit the watcher.</dim>')
->write('<dim>Press </dim>Enter<dim> to trigger a test run.</dim>');

return $this;
}
Expand Down
3 changes: 3 additions & 0 deletions src/Terminal.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public function write(string $message = '', $level = null)

$formattedMessage = (new OutputFormatter(true))->format($message);

$formattedMessage = str_replace('<dim>', "\e[2m", $formattedMessage);
$formattedMessage = str_replace('</dim>', "\e[22m", $formattedMessage);

$this->io->writeln($formattedMessage);

return $this;
Expand Down

0 comments on commit 3657b28

Please sign in to comment.