Today as I unit tested my view scripts using asertXpath() via Zend_Test, I was thinking how far along I’ve come from writing notes whilst reading books on what the difference between Aggregation and Composition is, then posting confused questions on the Advanced PHP forum at SitePoint. People are very generous with information and happily help out – they just give and give.
I, on the other hand, did nothing but take and take – even to this point – so now I decided that one way to give back was to write a post on how to set up the Zend Framework complete with a model layer that I am going to be proposing. This should be interesting seeing as I’ve only _just_ managed to implement a Model Service layer which uses Doctrine ORM as a means to connect to the database.
I’ll also provide source code and will host it on github or google. What I found was that even though there was a lot of resources out there on how to integrate Zend Frameowk, Doctrine and PHPUnit on your devbox, some were a little out dated and some were a little unclear leaving me to feel my way around.
SO what I’m going to try and do is write something that can be used as a skeleton for anyone who may want to just knuckle down and hit the ground running. Not that you can’t already with the current Zend QuickStart, but I don’t think that I’m the only one who had problems getting this all to work so my target audience for this type blog post series are developers who have just discovered Zend Framework, Doctrine and Unit Testing and would like to have some references to poke around.
I guess that’s my thing for today. I’ll spend some hours on making sure it’s comprehensive enough to use as a how-to and present solutions on how I got around certain things such as the prerequisite to have Aggressive Model Autoloading for doctrine when in the Unit Testing Command line which uses Doctrine-CLI to refresh tables etc.
It won’t be tomorrow, but it will be done during the following weeks. I’ll be in touch.


Hi rvdavid,
It’s great to see your post and willingness to share your knowledge with the php community.
Myself has done some work on the same topic of setting up zf, doctrine and phpunit.
My files are shared on github (http://github.com/marsbomber/zf-with-doctrine). Please feel free to fork and use it as a base if you like. and i’ll be more than happy to see your version! keep us posted!
Cheers
Thank you for the feedback and offer marsbomber – I’ll be sure to check out your code base