Merge branch '5.2' into 5.x
* 5.2: [Security] Fix test fix test [Console] Fix tests
This commit is contained in:
commit
f052d11a43
@ -205,7 +205,7 @@ class ApplicationTest extends TestCase
|
|||||||
$tester->run(['command' => 'list']);
|
$tester->run(['command' => 'list']);
|
||||||
|
|
||||||
$this->assertSame(0, $tester->getStatusCode());
|
$this->assertSame(0, $tester->getStatusCode());
|
||||||
$display = explode('Lists commands', $tester->getDisplay());
|
$display = explode('List commands', $tester->getDisplay());
|
||||||
|
|
||||||
$this->assertStringContainsString(trim('[WARNING] Some commands could not be registered:'), trim($display[1]));
|
$this->assertStringContainsString(trim('[WARNING] Some commands could not be registered:'), trim($display[1]));
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
"phpunit/phpunit": "<5.4.3",
|
"phpunit/phpunit": "<5.4.3",
|
||||||
"symfony/asset": "<5.3",
|
"symfony/asset": "<5.3",
|
||||||
"symfony/browser-kit": "<4.4",
|
"symfony/browser-kit": "<4.4",
|
||||||
"symfony/console": "<5.2",
|
"symfony/console": "<5.2.5",
|
||||||
"symfony/dotenv": "<5.1",
|
"symfony/dotenv": "<5.1",
|
||||||
"symfony/dom-crawler": "<4.4",
|
"symfony/dom-crawler": "<4.4",
|
||||||
"symfony/http-client": "<4.4",
|
"symfony/http-client": "<4.4",
|
||||||
|
@ -23,7 +23,7 @@ class ListCommandTest extends TestCase
|
|||||||
$commandTester = new CommandTester($command = $application->get('list'));
|
$commandTester = new CommandTester($command = $application->get('list'));
|
||||||
$commandTester->execute(['command' => $command->getName()], ['decorated' => false]);
|
$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()
|
public function testExecuteListsCommandsWithXmlOption()
|
||||||
@ -40,8 +40,8 @@ class ListCommandTest extends TestCase
|
|||||||
$commandTester = new CommandTester($command = $application->get('list'));
|
$commandTester = new CommandTester($command = $application->get('list'));
|
||||||
$commandTester->execute(['command' => $command->getName(), '--raw' => true]);
|
$commandTester->execute(['command' => $command->getName(), '--raw' => true]);
|
||||||
$output = <<<'EOF'
|
$output = <<<'EOF'
|
||||||
help Displays help for a command
|
help Display help for a command
|
||||||
list Lists commands
|
list List commands
|
||||||
|
|
||||||
EOF;
|
EOF;
|
||||||
|
|
||||||
@ -85,8 +85,8 @@ Options:
|
|||||||
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
|
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
|
||||||
|
|
||||||
Available commands:
|
Available commands:
|
||||||
help Displays help for a command
|
help Display help for a command
|
||||||
list Lists commands
|
list List commands
|
||||||
0foo
|
0foo
|
||||||
0foo:bar 0foo:bar command
|
0foo:bar 0foo:bar command
|
||||||
EOF;
|
EOF;
|
||||||
@ -102,8 +102,8 @@ EOF;
|
|||||||
$commandTester = new CommandTester($command = $application->get('list'));
|
$commandTester = new CommandTester($command = $application->get('list'));
|
||||||
$commandTester->execute(['command' => $command->getName(), '--raw' => true]);
|
$commandTester->execute(['command' => $command->getName(), '--raw' => true]);
|
||||||
$output = <<<'EOF'
|
$output = <<<'EOF'
|
||||||
help Displays help for a command
|
help Display help for a command
|
||||||
list Lists commands
|
list List commands
|
||||||
0foo:bar 0foo:bar command
|
0foo:bar 0foo:bar command
|
||||||
EOF;
|
EOF;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"usage": [
|
"usage": [
|
||||||
"help [--format FORMAT] [--raw] [--] [<command_name>]"
|
"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>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>app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.",
|
"help": "The <info>help<\/info> command displays help for a given command:\n\n <info>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>app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.",
|
||||||
"definition": {
|
"definition": {
|
||||||
"arguments": {
|
"arguments": {
|
||||||
@ -109,7 +109,7 @@
|
|||||||
"usage": [
|
"usage": [
|
||||||
"list [--raw] [--format FORMAT] [--short] [--] [<namespace>]"
|
"list [--raw] [--format FORMAT] [--short] [--] [<namespace>]"
|
||||||
],
|
],
|
||||||
"description": "Lists commands",
|
"description": "List commands",
|
||||||
"help": "The <info>list<\/info> command lists all commands:\n\n <info>app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>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>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>app\/console list --raw<\/info>",
|
"help": "The <info>list<\/info> command lists all commands:\n\n <info>app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>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>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>app\/console list --raw<\/info>",
|
||||||
"definition": {
|
"definition": {
|
||||||
"arguments": {
|
"arguments": {
|
||||||
|
@ -7,7 +7,7 @@ Console Tool
|
|||||||
`help`
|
`help`
|
||||||
------
|
------
|
||||||
|
|
||||||
Displays help for a command
|
Display help for a command
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ Do not ask any interactive question
|
|||||||
`list`
|
`list`
|
||||||
------
|
------
|
||||||
|
|
||||||
Lists commands
|
List commands
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
|
@ -12,5 +12,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
|
<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>
|
<comment>Available commands:</comment>
|
||||||
<info>help</info> Displays help for a command
|
<info>help</info> Display help for a command
|
||||||
<info>list</info> Lists commands
|
<info>list</info> List commands
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<usages>
|
<usages>
|
||||||
<usage>help [--format FORMAT] [--raw] [--] [<command_name>]</usage>
|
<usage>help [--format FORMAT] [--raw] [--] [<command_name>]</usage>
|
||||||
</usages>
|
</usages>
|
||||||
<description>Displays help for a command</description>
|
<description>Display help for a command</description>
|
||||||
<help>The <info>help</info> command displays help for a given command:
|
<help>The <info>help</info> command displays help for a given command:
|
||||||
|
|
||||||
<info>app/console help list</info>
|
<info>app/console help list</info>
|
||||||
@ -60,7 +60,7 @@
|
|||||||
<usages>
|
<usages>
|
||||||
<usage>list [--raw] [--format FORMAT] [--short] [--] [<namespace>]</usage>
|
<usage>list [--raw] [--format FORMAT] [--short] [--] [<namespace>]</usage>
|
||||||
</usages>
|
</usages>
|
||||||
<description>Lists commands</description>
|
<description>List commands</description>
|
||||||
<help>The <info>list</info> command lists all commands:
|
<help>The <info>list</info> command lists all commands:
|
||||||
|
|
||||||
<info>app/console list</info>
|
<info>app/console list</info>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"usage": [
|
"usage": [
|
||||||
"help [--format FORMAT] [--raw] [--] [<command_name>]"
|
"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>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>app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.",
|
"help": "The <info>help<\/info> command displays help for a given command:\n\n <info>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>app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.",
|
||||||
"definition": {
|
"definition": {
|
||||||
"arguments": {
|
"arguments": {
|
||||||
@ -113,7 +113,7 @@
|
|||||||
"usage": [
|
"usage": [
|
||||||
"list [--raw] [--format FORMAT] [--short] [--] [<namespace>]"
|
"list [--raw] [--format FORMAT] [--short] [--] [<namespace>]"
|
||||||
],
|
],
|
||||||
"description": "Lists commands",
|
"description": "List commands",
|
||||||
"help": "The <info>list<\/info> command lists all commands:\n\n <info>app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>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>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>app\/console list --raw<\/info>",
|
"help": "The <info>list<\/info> command lists all commands:\n\n <info>app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>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>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>app\/console list --raw<\/info>",
|
||||||
"definition": {
|
"definition": {
|
||||||
"arguments": {
|
"arguments": {
|
||||||
|
@ -20,7 +20,7 @@ My Symfony application v1.0
|
|||||||
`help`
|
`help`
|
||||||
------
|
------
|
||||||
|
|
||||||
Displays help for a command
|
Display help for a command
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ Do not ask any interactive question
|
|||||||
`list`
|
`list`
|
||||||
------
|
------
|
||||||
|
|
||||||
Lists commands
|
List commands
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
|
@ -12,8 +12,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
|
<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>
|
<comment>Available commands:</comment>
|
||||||
<info>help</info> Displays help for a command
|
<info>help</info> Display help for a command
|
||||||
<info>list</info> Lists commands
|
<info>list</info> List commands
|
||||||
<comment>descriptor</comment>
|
<comment>descriptor</comment>
|
||||||
<info>descriptor:command1</info> [alias1|alias2] command 1 description
|
<info>descriptor:command1</info> [alias1|alias2] command 1 description
|
||||||
<info>descriptor:command2</info> command 2 description
|
<info>descriptor:command2</info> command 2 description
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<usages>
|
<usages>
|
||||||
<usage>help [--format FORMAT] [--raw] [--] [<command_name>]</usage>
|
<usage>help [--format FORMAT] [--raw] [--] [<command_name>]</usage>
|
||||||
</usages>
|
</usages>
|
||||||
<description>Displays help for a command</description>
|
<description>Display help for a command</description>
|
||||||
<help>The <info>help</info> command displays help for a given command:
|
<help>The <info>help</info> command displays help for a given command:
|
||||||
|
|
||||||
<info>app/console help list</info>
|
<info>app/console help list</info>
|
||||||
@ -60,7 +60,7 @@
|
|||||||
<usages>
|
<usages>
|
||||||
<usage>list [--raw] [--format FORMAT] [--short] [--] [<namespace>]</usage>
|
<usage>list [--raw] [--format FORMAT] [--short] [--] [<namespace>]</usage>
|
||||||
</usages>
|
</usages>
|
||||||
<description>Lists commands</description>
|
<description>List commands</description>
|
||||||
<help>The <info>list</info> command lists all commands:
|
<help>The <info>list</info> command lists all commands:
|
||||||
|
|
||||||
<info>app/console list</info>
|
<info>app/console list</info>
|
||||||
|
@ -11,7 +11,7 @@ MbString åpplicätion
|
|||||||
`help`
|
`help`
|
||||||
------
|
------
|
||||||
|
|
||||||
Displays help for a command
|
Display help for a command
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ Do not ask any interactive question
|
|||||||
`list`
|
`list`
|
||||||
------
|
------
|
||||||
|
|
||||||
Lists commands
|
List commands
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
|
@ -12,7 +12,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
|
<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>
|
<comment>Available commands:</comment>
|
||||||
<info>help</info> Displays help for a command
|
<info>help</info> Display help for a command
|
||||||
<info>list</info> Lists commands
|
<info>list</info> List commands
|
||||||
<comment>descriptor</comment>
|
<comment>descriptor</comment>
|
||||||
<info>descriptor:åèä</info> command åèä description
|
<info>descriptor:åèä</info> command åèä description
|
||||||
|
@ -12,5 +12,5 @@ Options:
|
|||||||
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
|
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
|
||||||
|
|
||||||
Available commands:
|
Available commands:
|
||||||
help Displays help for a command
|
help Display help for a command
|
||||||
list Lists commands
|
list List commands
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Description:
|
Description:
|
||||||
Lists commands
|
List commands
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
list [options] [--] [<namespace>]
|
list [options] [--] [<namespace>]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Description:
|
Description:
|
||||||
Lists commands
|
List commands
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
list [options] [--] [<namespace>]
|
list [options] [--] [<namespace>]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Description:
|
Description:
|
||||||
Displays help for a command
|
Display help for a command
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
help [options] [--] [<command_name>]
|
help [options] [--] [<command_name>]
|
||||||
|
Reference in New Issue
Block a user