function it_should_handling_the_log_as_bubble(ConsoleOutputInterface $output, ConsoleOutputInterface $errorOutput)
 {
     $output->writeln(Argument::any())->willReturn(null);
     $output->getVerbosity()->shouldBeCalled()->willReturn(OutputInterface::VERBOSITY_DEBUG);
     $output->write('<info>[16:21:54] app.INFO:</info> My info message' . "\n")->shouldBeCalled();
     $this->beConstructedWith(null, false);
     $this->setOutput($output);
     $infoRecord = array('message' => 'My info message', 'context' => array(), 'level' => Logger::INFO, 'level_name' => Logger::getLevelName(Logger::INFO), 'channel' => 'app', 'datetime' => new \DateTime('2013-05-29 16:21:54'), 'extra' => array());
     $this->handle($infoRecord)->shouldReturn(true);
     $output->getErrorOutput()->willReturn($errorOutput)->shouldBeCalled();
     $errorOutput->write('<error>[16:21:54] app.ERROR:</error> My error message' . "\n")->shouldBeCalled();
     $errorRecord = array('message' => 'My error message', 'context' => array(), 'level' => Logger::ERROR, 'level_name' => Logger::getLevelName(Logger::ERROR), 'channel' => 'app', 'datetime' => new \DateTime('2013-05-29 16:21:54'), 'extra' => array());
     $this->handle($errorRecord)->shouldReturn(true);
 }
Beispiel #2
0
 /**
  * @return int
  */
 public function getVerbosity()
 {
     return $this->output->getVerbosity();
 }