这是一个已知的错误.
以下是解决此问题的解决方法:
bootstrap = array($this, 'appBootstrap'); parent::setUp(); } public function appBootstrap() { $this->_application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ); $this->_application->bootstrap(); /** * Fix for ZF-8193 * http://framework.zend.com/issues/browse/ZF-8193 * Zend_Controller_Action->getInvokeArg('bootstrap') doesn't work * under the unit testing environment. */ $front = Zend_Controller_Front::getInstance(); if($front->getParam('bootstrap') === null) { $front->setParam('bootstrap', $this->_application->getBootstrap()); } } }