@@ -62,33 +62,49 @@ public function testExecuteListsCommandsWithNamespaceArgument()
62
62
$ this ->assertEquals ($ output , $ commandTester ->getDisplay (true ));
63
63
}
64
64
65
- public function testExecuteListsCommandsNameAndNamespaceRaw ()
65
+ public function testExecuteListsCommandsOrder ()
66
66
{
67
67
require_once realpath (__DIR__ .'/../Fixtures/Foo6Command.php ' );
68
68
$ application = new Application ();
69
69
$ application ->add (new \Foo6Command ());
70
70
$ commandTester = new CommandTester ($ command = $ application ->get ('list ' ));
71
- $ commandTester ->execute (array ('command ' => $ command ->getName ()));
71
+ $ commandTester ->execute (array ('command ' => $ command ->getName ()), array ( ' decorated ' => false ) );
72
72
$ output = <<<EOF
73
73
Console Tool
74
74
75
75
Usage:
76
- [options] command [arguments]
76
+ command [options] [arguments]
77
77
78
78
Options:
79
- --help (-h) Display this help message.
80
- --quiet (-q) Do not output any message.
81
- --verbose ( -v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
82
- --version (-V) Display this application version.
83
- --ansi Force ANSI output.
84
- --no-ansi Disable ANSI output.
85
- --no-interaction (-n) Do not ask any interactive question.
79
+ --help -h Display this help message
80
+ --quiet -q Do not output any message
81
+ --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
82
+ --version -V Display this application version
83
+ --ansi Force ANSI output
84
+ --no-ansi Disable ANSI output
85
+ --no-interaction -n Do not ask any interactive question
86
86
87
87
Available commands:
88
- help Displays help for a command
89
- list Lists commands
90
- <fg=blue>foo
91
- <fg=blue>foo:bar</fg=blue>
88
+ help Displays help for a command
89
+ list Lists commands
90
+ 0foo
91
+ 0foo:bar 0foo:bar command
92
+ EOF ;
93
+
94
+ $ this ->assertEquals ($ output , trim ($ commandTester ->getDisplay (true )));
95
+ }
96
+
97
+ public function testExecuteListsCommandsOrderRaw ()
98
+ {
99
+ require_once realpath (__DIR__ .'/../Fixtures/Foo6Command.php ' );
100
+ $ application = new Application ();
101
+ $ application ->add (new \Foo6Command ());
102
+ $ commandTester = new CommandTester ($ command = $ application ->get ('list ' ));
103
+ $ commandTester ->execute (array ('command ' => $ command ->getName (), '--raw ' => true ));
104
+ $ output = <<<EOF
105
+ help Displays help for a command
106
+ list Lists commands
107
+ 0foo:bar 0foo:bar command
92
108
EOF ;
93
109
94
110
$ this ->assertEquals ($ output , trim ($ commandTester ->getDisplay (true )));
0 commit comments