29 $mongo = $this->getMock(
'Mongo', array(
'selectCollection'), array(),
'',
false);
30 $collection = $this->getMock(
'stdClass', array(
'save'));
32 $mongo->expects($this->
once())
33 ->method(
'selectCollection')
34 ->with(
'DB',
'Collection')
35 ->will($this->returnValue($collection));
41 'context' => array(
'data' =>
'[object] (stdClass: {})',
'foo' => 34),
43 'level_name' =>
'WARNING',
45 'datetime' => $record[
'datetime']->format(
'Y-m-d H:i:s'),
49 $collection->expects($this->
once())
58 if (!class_exists(
'Mongo')) {
61 public function selectCollection()
getRecord($level=Logger::WARNING, $message='test', $context=array())
Logs to a MongoDB database.
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
const WARNING
Exceptional occurrences that are not errors.
testConstructorShouldThrowExceptionForInvalidMongo()
InvalidArgumentException