12 namespace Symfony\Component\Console\Tests\Command;
26 $commandTester->execute(array(
'command_name' =>
'li'), array(
'decorated' =>
false));
27 $this->assertContains(
'list [options] [--] [<namespace>]', $commandTester->getDisplay(),
'->execute() returns a text help for the given command alias');
28 $this->assertContains(
'format=FORMAT', $commandTester->getDisplay(),
'->execute() returns a text help for the given command alias');
29 $this->assertContains(
'raw', $commandTester->getDisplay(),
'->execute() returns a text help for the given command alias');
37 $commandTester->execute(array(), array(
'decorated' =>
false));
38 $this->assertContains(
'list [options] [--] [<namespace>]', $commandTester->getDisplay(),
'->execute() returns a text help for the given command');
39 $this->assertContains(
'format=FORMAT', $commandTester->getDisplay(),
'->execute() returns a text help for the given command');
40 $this->assertContains(
'raw', $commandTester->getDisplay(),
'->execute() returns a text help for the given command');
48 $commandTester->execute(array(
'--format' =>
'xml'));
49 $this->assertContains(
'<command', $commandTester->getDisplay(),
'->execute() returns an XML help text if --xml is passed');
55 $commandTester =
new CommandTester($application->get(
'help'));
56 $commandTester->
execute(array(
'command_name' =>
'list'));
57 $this->assertContains(
'list [options] [--] [<namespace>]', $commandTester->getDisplay(),
'->execute() returns a text help for the given command');
58 $this->assertContains(
'format=FORMAT', $commandTester->getDisplay(),
'->execute() returns a text help for the given command');
59 $this->assertContains(
'raw', $commandTester->getDisplay(),
'->execute() returns a text help for the given command');
65 $commandTester =
new CommandTester($application->get(
'help'));
66 $commandTester->
execute(array(
'command_name' =>
'list',
'--format' =>
'xml'));
67 $this->assertContains(
'list [--xml] [--raw] [--format FORMAT] [--] [<namespace>]', $commandTester->getDisplay(),
'->execute() returns a text help for the given command');
68 $this->assertContains(
'<command', $commandTester->getDisplay(),
'->execute() returns an XML help text if --format=xml is passed');