Matthimatiker / MolComponents

Library with use-at-will architecture that extends the functionality of Zend Framework 1. Main features: Improved bootstrapping with lazy loading of resources, declaration of request parameters as argument in controller actions, advanced form creation and validation, mail templates, lightweight controller testing.
Other
2 stars 0 forks source link

Controller tests: Layout view helper uses wrong instance #60

Closed Matthimatiker closed 11 years ago

Matthimatiker commented 11 years ago

The setup in Mol_Test_WebControllerTestCase does not take the layout view helper into account. Therefore, the view helper does not use the Zend_Layout instance that is injected into the bootstrapper. Instead a global Zend_Layout instance is created when the view helper method getLayout() is called.

The simulated layout should be consistent. Therefore, the layout view helper should provide the same (non-global) instance that is already used by the other components.