Sunday, 27 July 2008Dependency Injection and Zend Framework ControllersTrackbacks
Testing models and controllers with Zend Framework: fake HTTP calls
Following last month's article by Ian, here's some thoughts on how to test a Zend Framework application. One of the unit testing best practices suggests to break dependencies, so you can test each component separately. The first problem that arises
Weblog: Ibuildings Blog
Gevolgd: Aug 29, 15:23
Dependency injection in ZF controllers
Dependency injection for Zend Framework controllers. Following on from our recent article on writing testable PHP code, it seems sensible to point out Ian Barber's article on dependency injection over at the iBuildings site.
Weblog: testomatic.co.uk
Gevolgd: Mar 27, 01:39 Reacties
Geeft reacties weer als
(Lineair | Samengevoegd)
Hopefully the Zend_Di componenet will be in the framework pretty soon http://tinyurl.com/56b929
Absolutely. Everything seemed to be a bit quiet on it at the moment, but having a proper configuration based container would be nice.
IMHO, Zend_Di is too complicated for inclusion in Zend Framework - the author admits as much in the comments to the proposal. Zend Framework prides itself on simplicity and, if its going to have a DI component (which I think would be a great addition) then this component needs to be really simple - something along the lines of PicoContainer. It should have one primary goal and that is to replace the use of Zend_Registry. There are several comments from me on the Zend_Di proposal explaining some ideas on how to create a dead-simple DI component for Zend Framework. I will try to summarize them on my blog and post the link here.
As promised:
http://bradley-holt.blogspot.com/2008/07/dependency-injection-in-zend-framework.html
Very interesting proposal Bradley, I like the idea.
I agree with Bradley - Dependency Injection must be seamlessly integrated into the framework and be part of its concept.
A rather promising framework I recently stumbled across is FLOW3: http://flow3.typo3.org
take a look at Garden, a DI framework for php5: http://garden.tigris.org
Really nice post. If you got some info testing Zend framework controller with PHPUnit. Please let me know.
|
Blog








