Ejemplo n.º 1
0
 public function testLegacyAsText()
 {
     $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->assertStringEqualsFile(self::$fixturesPath . '/command_astext.txt', $command->asText(), '->asText() returns a text representation of the command');
 }
Ejemplo n.º 2
0
 public function testAsText()
 {
     $command = new \TestCommand();
     $command->setApplication(new Application());
     $tester = new CommandTester($command);
     $tester->execute(array('command' => $command->getName()));
     $this->assertStringEqualsFile(self::$fixturesPath . '/command_astext.txt', $command->asText(), '->asText() returns a text representation of the command');
 }
Ejemplo n.º 3
0
 public function testAsText()
 {
     $command = new \TestCommand();
     $command->setApplication(new Application());
     $tester = new CommandTester($command);
     $tester->execute(array());
     $this->assertEquals($command->asText(), file_get_contents(self::$fixturesPath . '/command_astext.txt'), '->asText() returns a text representation of the command');
 }