You are here

public function CommandTest::testLegacyAsXml in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Command/CommandTest.php \Symfony\Component\Console\Tests\Command\CommandTest::testLegacyAsXml()

@group legacy

File

vendor/symfony/console/Tests/Command/CommandTest.php, line 329

Class

CommandTest

Namespace

Symfony\Component\Console\Tests\Command

Code

public function testLegacyAsXml() {
  $command = new \TestCommand();
  $command
    ->setApplication(new Application());
  $tester = new CommandTester($command);
  $tester
    ->execute(array(
    'command' => $command
      ->getName(),
  ));
  $this
    ->assertXmlStringEqualsXmlFile(self::$fixturesPath . '/command_asxml.txt', $command
    ->asXml(), '->asXml() returns an XML representation of the command');
}