Пример #1
0
 public function testLegacyAsXml()
 {
     $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
     $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');
 }
Пример #2
0
 public function testAsXml()
 {
     $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');
 }
Пример #3
0
 public function testAsXml()
 {
     $command = new \TestCommand();
     $command->setApplication(new Application());
     $tester = new CommandTester($command);
     $tester->execute(array());
     $this->assertEquals($command->asXml(), file_get_contents(self::$fixturesPath . '/command_asxml.txt'), '->asXml() returns an XML representation of the command');
 }