public function testHandler() { $expectedOptions = array('ignore_errors' => array('E_ALL' => array('info')), 'ignore_exceptions' => array('FooException'), 'log_ignored' => 1); $mock = $this->getMockForAbstractClass('fpErrorNotifierHandler', array(new sfEventDispatcher(), $expectedOptions)); sfConfig::set('sf_notify_handler', array('class' => get_class($mock), 'options' => $expectedOptions)); $notifier = new fpErrorNotifier(new sfEventDispatcher()); $handler = $notifier->handler(); $this->assertInstanceOf(get_class($mock), $handler); $this->assertAttributeEquals($expectedOptions, 'options', $handler); }
protected function getHeandler() { sfConfig::set('sf_notify_handler', array('class' => 'fpErrorNotifierHandlerTest', 'options' => array())); $notifier = new fpErrorNotifier(new sfEventDispatcher()); return $notifier->handler(); }