Skip to content

Commit 3eb5907

Browse files
committed
test: fix the tests
1 parent 73a4a4e commit 3eb5907

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/Helper/OutputHelperTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public function test_show_usage()
109109
'<bold> $0</end> <comment>-a apple</end> ## apple only<eol>',
110110
'<bold> $0</end> <comment>-a apple -b ball</end> ## apple ball<eol>',
111111
'loooooooooooong text ## something<eol>',
112+
'no shell comments<eol>',
112113
'short text ## something else<eol>',
113114
]));
114115

@@ -118,6 +119,7 @@ public function test_show_usage()
118119
' test -a apple # apple only',
119120
' test -a apple -b ball # apple ball',
120121
'loooooooooooong text # something',
122+
'no shell comments',
121123
'short text # something else',
122124
'',
123125
], $this->output());
@@ -128,7 +130,7 @@ public function test_show_usage()
128130
public function newHelper()
129131
{
130132
return new OutputHelper(new Writer(static::$ou, new class extends Color {
131-
protected $format = ':text:';
133+
protected $format = ':txt:';
132134
}));
133135
}
134136

tests/Input/CommandTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ protected function newCommand(string $version = '0.0.1', string $desc = '', bool
250250
{
251251
$p = new Command('cmd', $desc, $allowUnknown, $app);
252252

253-
return $p->version($version);
253+
return $p->version($version . \debug_backtrace()[1]['function'])->onExit(function () {
254+
return false;
255+
});
254256
}
255257
}

0 commit comments

Comments
 (0)