Issues

ZF-8797: Using Zend_Test_PHPUnit_ControllerTestCase with Zend_Application,The Resources shuold be reset

Description

It is relative to rev:18604 Please add Zend_Application::resetResoruce() and exec it in Zend_Test_PHPUnit_ControllerTestCase::reset()

For example, Zend_Test_PHPUnit_ControllerTestCase::bootstrap() resets the frontcontroller by resetInstance() and gets the frontcontroller same instance from Zend_Application. But it cannot be initialized by Zend_Application::bootstrap() because the bootstrap has it statically. As a result the frontcontroller instance is not designed but is a plain instance.

If all the Zend_Application's Resources are also reset in the Zend_Test_PHPUnit_ControllerTestCase::reset(), that


$this->_frontController = $this->bootstrap->getBootstrap()->getResource('frontcontroller');

will be return the just designed instance.

Comments

This should now be resolved in trunk.

I'm sorry and thank you. Now it works fine.

I made a bootstrap in TestHelper and registered it to the Registry and use it in ControllerTestCase::setUp before this problem resoleved . But now nomally use. $this->bootstrap = new Zend_Application(.......