I used this script within my ErrorController error action:

      $errors = $this->_getParam('error_handler');
      switch ($errors->type) {
        case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
        case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
          // 404
        break;
        
        default:
          // application error
        break;
      }


Sergio Rinaudo



> Date: Sun, 24 May 2009 04:26:59 -0700
> From: [email protected]
> To: [email protected]
> Subject: [fw-general] how to test error controller with application error
> 
> 
> hi, i'm trying to test that my error controller (standard zend example)
> catches application errors and shows an appropriate response. but i just
> can't figure out where to "inject" an error/exception in my unit test. it's
> easy to test 404 errors, but what about others? does anyone have an idea?
> -- 
> View this message in context: 
> http://www.nabble.com/how-to-test-error-controller-with-application-error-tp23692688p23692688.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

_________________________________________________________________
Messenger 2009: scaricalo gratis!
http://messenger.it/

Reply via email to