You are here

public function HelpCommandTest::testExecuteForCommandWithXmlOption in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/console/Tests/Command/HelpCommandTest.php \Symfony\Component\Console\Tests\Command\HelpCommandTest::testExecuteForCommandWithXmlOption()

File

vendor/symfony/console/Tests/Command/HelpCommandTest.php, line 43

Class

HelpCommandTest

Namespace

Symfony\Component\Console\Tests\Command

Code

public function testExecuteForCommandWithXmlOption() {
  $command = new HelpCommand();
  $commandTester = new CommandTester($command);
  $command
    ->setCommand(new ListCommand());
  $commandTester
    ->execute(array(
    '--format' => 'xml',
  ));
  $this
    ->assertContains('<command', $commandTester
    ->getDisplay(), '->execute() returns an XML help text if --xml is passed');
}