Skip to content

Commit c549e4d

Browse files
committed
test(command): usage example
1 parent 1ba90fb commit c549e4d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/Input/DefaultOptionTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ public function test_V()
2222
public function test_help()
2323
{
2424
$p = $this->newCommand()
25-
->arguments('[arg]')
25+
->argument('[arg]', 'Some desc')
2626
->option('-o --option')
27+
->usage('cmdname --option opt <arg>')
2728
->parse(['php', '--help']);
2829

2930
$this->assertContains('cmdname', $buffer = $this->buffer());
31+
$this->assertContains('Usage Examples:', $buffer);
32+
$this->assertContains('--option opt <arg>', $buffer);
3033
$this->assertContains('[arg]', $buffer);
34+
$this->assertContains('Some desc', $buffer);
3135
$this->assertContains('[-o|--option]', $buffer);
3236
}
3337

0 commit comments

Comments
 (0)