Exemplo n.º 1
0
 public function testProcessorRecords()
 {
     $Handler = new \Monolog\Handler\TestHandler();
     $config = array('rules' => array('*' => array('error' => array('handler' => array('error-handler'), 'processor' => array('uid')))), 'handler' => array('error-handler' => $Handler), 'processor' => array('uid' => array('type' => 'Monolog\\Processor\\UidProcessor', 'args' => array())));
     Monoconf::config($config);
     $Logger = Monoconf::getLogger('MyApp\\Other\\Class');
     $Logger->error('foo');
     $this->assertTrue($Handler->hasErrorRecords('foo'));
     $records = $Handler->getRecords();
     $this->assertTrue(isset($records[0]['extra']['uid']));
 }