public function testSetErrorHandler() { $this->_model->setErrorHandler(array($this, 'errorHandler')); try { trigger_error('test', E_USER_NOTICE); if (!$this->_errorCatchFlag) { $this->fail('Error handler is not working'); } restore_error_handler(); } catch (Exception $e) { restore_error_handler(); throw $e; } }