Browse Source

Test xml help formatter

Fernando Herrero 2 years ago
parent
commit
5ee601ee90

+ 1 - 1
tests/TestCase/Console/ConsoleOptionParserTest.php

@@ -895,7 +895,7 @@ TEXT;
         $spec = [
             'command' => 'test',
             'arguments' => [
-                'name' => ['help' => 'The name'],
+                'name' => ['help' => 'The name', 'default' => 'foo'],
                 'other' => ['help' => 'The other arg'],
             ],
             'options' => [

+ 2 - 2
tests/TestCase/Console/HelpFormatterTest.php

@@ -266,7 +266,7 @@ xml;
                 'choices' => ['aco', 'aro'],
                 'required' => true,
             ])
-            ->addArgument('other_longer', ['help' => 'Another argument.']);
+            ->addArgument('other_longer', ['help' => 'Another argument.', 'default' => 'foo']);
 
         $formatter = new HelpFormatter($parser);
         $result = $formatter->xml();
@@ -295,7 +295,7 @@ xml;
 			<choice>aro</choice>
 		</choices>
 	</argument>
-	<argument name="other_longer" help="Another argument." required="0">
+	<argument name="other_longer" help="Another argument." required="0" default="foo">
 		<choices></choices>
 	</argument>
 </arguments>