The Zend_Controller_Plugin_ErrorHandler plugin handles exceptions for you, and by default Error_Controller forces a redirect of 500, which may mean that the exception you are testing no longer exists. Try a unit test and see if it passes:
public function testUnknownUserRedirectsToErrorPage() { $this->dispatch('/user/validate'); $this->assertController('error'); $this->assertAction('error'); $this->assertResponseCode('500'); }
If this works, then it shows that by the time you create the error view, the exception will no longer exist, as it is contained in the code before the redirect.
source share