You are here

public function ListCommandTest::testExecuteListsCommandsWithXmlOption in Zircon Profile 8.0

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

File

vendor/symfony/console/Tests/Command/ListCommandTest.php, line 28

Class

ListCommandTest

Namespace

Symfony\Component\Console\Tests\Command

Code

public function testExecuteListsCommandsWithXmlOption() {
  $application = new Application();
  $commandTester = new CommandTester($command = $application
    ->get('list'));
  $commandTester
    ->execute(array(
    'command' => $command
      ->getName(),
    '--format' => 'xml',
  ));
  $this
    ->assertRegExp('/<command id="list" name="list">/', $commandTester
    ->getDisplay(), '->execute() returns a list of available commands in XML if --xml is passed');
}