Inheritance: extends Symfony\Component\Console\Application
Example #1
0
 public function testOutput()
 {
     $app = new Application(new Config(array('adapter' => 'cli')));
     $app->add(new DummyCommand());
     $app->setAutoExit(false);
     $output = new BufferedOutput();
     $code = $app->run(new StringInput("dummy -vvv"), $output);
     $this->assertSame(42, $code);
 }
Example #2
0
 public function runCommand($cmd)
 {
     $app = new Application(new Config(array('adapter' => 'cli')));
     $app->setAutoExit(false);
     $input = new StringInput($cmd);
     $output = new BufferedOutput();
     $app->run($input, $output);
     return $output->fetch();
 }