Skip to content

Commit fa0e3a3

Browse files
traubisodafreekmurze
authored andcommitted
Add option to hide helper messages (#84)
* add option to hide manual * fix missing trailing comma * document helper hiding in readme
1 parent ad2ce98 commit fa0e3a3

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ notifications:
111111
failingTests: false
112112
```
113113

114+
### Help messages
115+
By default the tool will display a helper for keyboard actions after each run. You can hide these help messages by adding a `hideManual` key in the `.phpunit-watcher.yml`.
116+
117+
```yaml
118+
hideManual: true
119+
```
120+
114121
### Customize PHPUnit
115122

116123
#### Binary

src/Screens/Phpunit.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ protected function runTests()
103103

104104
protected function displayManual()
105105
{
106+
if ($this->options['hideManual']) {
107+
return $this;
108+
}
109+
106110
$this->terminal
107111
->emptyLine()
108112
->write('<dim>Press </dim>a<dim> to run all tests.</dim>')

src/WatcherFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ protected static function mergeWithDefaultOptions(array $options): array
4646
'passingTests' => true,
4747
'failingTests' => true,
4848
],
49+
'hideManual' => false,
4950
], $options);
5051

5152
$options['watch']['directories'] = array_map(function ($directory) {

0 commit comments

Comments
 (0)