Skip to content

Commit

Permalink
[Console] Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chalasr committed Mar 6, 2021
1 parent 5360aa2 commit 701ae4a
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 31 deletions.
14 changes: 7 additions & 7 deletions Tests/Command/ListCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testExecuteListsCommands()
$commandTester = new CommandTester($command = $application->get('list'));
$commandTester->execute(['command' => $command->getName()], ['decorated' => false]);

$this->assertMatchesRegularExpression('/help\s{2,}Displays help for a command/', $commandTester->getDisplay(), '->execute() returns a list of available commands');
$this->assertMatchesRegularExpression('/help\s{2,}Display help for a command/', $commandTester->getDisplay(), '->execute() returns a list of available commands');
}

public function testExecuteListsCommandsWithXmlOption()
Expand All @@ -40,8 +40,8 @@ public function testExecuteListsCommandsWithRawOption()
$commandTester = new CommandTester($command = $application->get('list'));
$commandTester->execute(['command' => $command->getName(), '--raw' => true]);
$output = <<<'EOF'
help Displays help for a command
list Lists commands
help Display help for a command
list List commands

EOF;

Expand Down Expand Up @@ -86,8 +86,8 @@ public function testExecuteListsCommandsOrder()
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
help Display help for a command
list List commands
0foo
0foo:bar 0foo:bar command
EOF;
Expand All @@ -103,8 +103,8 @@ public function testExecuteListsCommandsOrderRaw()
$commandTester = new CommandTester($command = $application->get('list'));
$commandTester->execute(['command' => $command->getName(), '--raw' => true]);
$output = <<<'EOF'
help Displays help for a command
list Lists commands
help Display help for a command
list List commands
0foo:bar 0foo:bar command
EOF;

Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"usage": [
"help [--format FORMAT] [--raw] [--] [<command_name>]"
],
"description": "Displays help for a command",
"description": "Display help for a command",
"help": "The <info>help<\/info> command displays help for a given command:\n\n <info>php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.",
"definition": {
"arguments": {
Expand Down Expand Up @@ -109,7 +109,7 @@
"usage": [
"list [--raw] [--format FORMAT] [--] [<namespace>]"
],
"description": "Lists commands",
"description": "List commands",
"help": "The <info>list<\/info> command lists all commands:\n\n <info>php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php app\/console list --raw<\/info>",
"definition": {
"arguments": {
Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Console Tool
`help`
------

Displays help for a command
Display help for a command

### Usage

Expand Down Expand Up @@ -119,7 +119,7 @@ Do not ask any interactive question
`list`
------

Lists commands
List commands

### Usage

Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Console Tool
<info>-v|vv|vvv, --verbose</info> Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

<comment>Available commands:</comment>
<info>help</info> Displays help for a command
<info>list</info> Lists commands
<info>help</info> Display help for a command
<info>list</info> List commands
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<usages>
<usage>help [--format FORMAT] [--raw] [--] [&lt;command_name&gt;]</usage>
</usages>
<description>Displays help for a command</description>
<description>Display help for a command</description>
<help>The &lt;info&gt;help&lt;/info&gt; command displays help for a given command:

&lt;info&gt;php app/console help list&lt;/info&gt;
Expand Down Expand Up @@ -60,7 +60,7 @@
<usages>
<usage>list [--raw] [--format FORMAT] [--] [&lt;namespace&gt;]</usage>
</usages>
<description>Lists commands</description>
<description>List commands</description>
<help>The &lt;info&gt;list&lt;/info&gt; command lists all commands:

&lt;info&gt;php app/console list&lt;/info&gt;
Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"usage": [
"help [--format FORMAT] [--raw] [--] [<command_name>]"
],
"description": "Displays help for a command",
"description": "Display help for a command",
"help": "The <info>help<\/info> command displays help for a given command:\n\n <info>php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.",
"definition": {
"arguments": {
Expand Down Expand Up @@ -113,7 +113,7 @@
"usage": [
"list [--raw] [--format FORMAT] [--] [<namespace>]"
],
"description": "Lists commands",
"description": "List commands",
"help": "The <info>list<\/info> command lists all commands:\n\n <info>php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php app\/console list --raw<\/info>",
"definition": {
"arguments": {
Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ My Symfony application v1.0
`help`
------

Displays help for a command
Display help for a command

### Usage

Expand Down Expand Up @@ -132,7 +132,7 @@ Do not ask any interactive question
`list`
------

Lists commands
List commands

### Usage

Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ My Symfony application <info>v1.0</info>
<info>-v|vv|vvv, --verbose</info> Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

<comment>Available commands:</comment>
<info>help</info> Displays help for a command
<info>list</info> Lists commands
<info>help</info> Display help for a command
<info>list</info> List commands
<comment>descriptor</comment>
<info>descriptor:command1</info> [alias1|alias2] command 1 description
<info>descriptor:command2</info> command 2 description
Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<usages>
<usage>help [--format FORMAT] [--raw] [--] [&lt;command_name&gt;]</usage>
</usages>
<description>Displays help for a command</description>
<description>Display help for a command</description>
<help>The &lt;info&gt;help&lt;/info&gt; command displays help for a given command:

&lt;info&gt;php app/console help list&lt;/info&gt;
Expand Down Expand Up @@ -60,7 +60,7 @@
<usages>
<usage>list [--raw] [--format FORMAT] [--] [&lt;namespace&gt;]</usage>
</usages>
<description>Lists commands</description>
<description>List commands</description>
<help>The &lt;info&gt;list&lt;/info&gt; command lists all commands:

&lt;info&gt;php app/console list&lt;/info&gt;
Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_mbstring.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MbString åpplicätion
`help`
------

Displays help for a command
Display help for a command

### Usage

Expand Down Expand Up @@ -123,7 +123,7 @@ Do not ask any interactive question
`list`
------

Lists commands
List commands

### Usage

Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_mbstring.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ MbString åpplicätion
<info>-v|vv|vvv, --verbose</info> Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

<comment>Available commands:</comment>
<info>help</info> Displays help for a command
<info>list</info> Lists commands
<info>help</info> Display help for a command
<info>list</info> List commands
<comment>descriptor</comment>
<info>descriptor:åèä</info> command åèä description
4 changes: 2 additions & 2 deletions Tests/Fixtures/application_run1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Options:
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
help Displays help for a command
list Lists commands
help Display help for a command
list List commands
2 changes: 1 addition & 1 deletion Tests/Fixtures/application_run2.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description:
Lists commands
List commands

Usage:
list [options] [--] [<namespace>]
Expand Down
2 changes: 1 addition & 1 deletion Tests/Fixtures/application_run3.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description:
Lists commands
List commands

Usage:
list [options] [--] [<namespace>]
Expand Down

0 comments on commit 701ae4a

Please sign in to comment.