->
expects($this->
any()) ->
method('getVerbosity'
) ->
willReturn(OutputInterface::VERBOSITY_DEBUG
) ;
$output ->
expects($this->
once()) ->
method('write'
) ->
with("16:21:54 <fg=green>INFO </> <comment>[app]</> My info message\n"
) ;
$handler =
new ConsoleHandler(null, false
);
$handler->
setOutput($output);
$infoRecord = RecordFactory::
create(Logger::INFO, 'My info message', 'app', datetime:
new \
DateTimeImmutable('2013-05-29 16:21:54'
));
$this->
assertTrue($handler->
handle($infoRecord), 'The handler finished handling the log as bubble is false.'
);
} public function testLogsFromListeners() { $output =
new BufferedOutput();
$output->
setVerbosity(OutputInterface::VERBOSITY_DEBUG
);