I have to preface this video by saying that I’m still a bit of a novice when it comes to unit testing (especially in Zend). Also, I feel that I wouldn’t be able to take credit for the whole implementation.
Here are some great resources on unit testing in the Zend Framework to beef up your knowledge.
- Set up a Zend Framework application using Zend_Application (including PHPUnit setup)
- Testing Zend Framework MVC Applications – phly, boy, phly
- Matthew’s pastebin
The trouble with these is that they’re mostly pre-1.8. I’ve taken the approach of using a command line instead of the IDE since this way it doesn’t matter if you’re using Zend Studio for Eclipse.
- Using phpunit with MAMP
- Unit Testing Models
- Generating Code Coverage Reports
- Unit Testing Controllers