Unit Testing My Zend Framework Application

Posted on: Aug 07, 2009 by wenbert

Okay, I have been getting into Unit Testing the past few days. With the help of Jon Lebensold’s screencast, I was able to jump right in quickly.

Right now I am looking into creating Mock Objects for my tests. I found this and this from zomg’s blog. Searching around, this is probably the easiest article to get myself started with Mock Objects in PHPUnit.


Subscribe to comments Comment | Trackback |
Post Tags: , , , , ,

Browse Timeline


Comments ( 3 )

It seems like such a pain to set up unit testing… Have you been using it long enough to report if it is really worth the time, or what kinds of problems you find the most using it?

Renowned Media added these pithy words on Aug 22 09 at 12:25 AM

Hello Renowned Media, I am a beginner at using Unit Testing. In fact, I have just started using it.

To answer your question, I have had a million instances where in I made modifications on my functions/methods to fix a bug. The modification in turn broke the other functions/methods that depended on it. I only found out a few days after the fix. This is because I did not Unit Test my code.

Wenbert added these pithy words on Aug 22 09 at 1:28 AM

Remember that testing first (writing unit tests before writing the code) is the best way to ensure your code is testable. :) I often write about object-oriented php, if you’re interested on my blog there is a step by step series on phpunit testing (I’ve put the link in the Website field, it’under the ‘php testing series’ tag).

Giorgio Sironi added these pithy words on Oct 28 09 at 4:04 PM

Add a Comment


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">


© Copyright 2007 eKini Web Developer Blog . Thanks for visiting!