/** * @covers phpDocumentor\Console\Output\Output::setLogger * @covers phpDocumentor\Console\Output\Output::getLogger */ public function testSetAndGetLoggerWithString() { $output = new Output(); $logger = m::mock('Monolog\\Logger'); $output->setLogger($logger); $this->assertEquals($logger, $output->getLogger()); }
/** * Run the application and if no command is provided, use project:run. * * @param bool $interactive Whether to run in interactive mode. * * @return void */ public function run($interactive = false) { /** @var ConsoleApplication $app */ $app = $this['console']; $app->setAutoExit(false); if ($interactive) { $app = new Shell($app); } $output = new Console\Output\Output(); $output->setLogger($this['monolog']); $app->run(new ArgvInput(), $output); }