[UPHPU] PHPunit

Fred Larsen fred at bitwyze.com
Mon Nov 7 16:03:54 MST 2005


On Nov 6, 2005, at 3:28 PM, TJ Hunter wrote:

>Has anyone here done anything with unit testing PHP? I'd like to look
>into using PHPunit at work and don't know where to start. I've read a
>bit of documentation on it, but everything I've read is targeted
>towards programmers have already done some type of unit testing (with
>other languages). I think I'm grasping the basics, but having a hard
>time figuring out how to apply it to real world examples.
>
>Any tips?
>-TJ


Unit testing is great.  I have to admit that it takes some discipline 
to keep with it.

I used to use PhpUnit for everything but I switched to SimpleTest a while 
back because at the time it had
support for MockObjects and PhpUnit did not.

SimpleTest resources
http://www.lastcraft.com/simple_test.php
http://simpletest.org/

Advanced PHP Programming by George Schlossnagle has some really good stuff 
on unit testing.
http://www.amazon.com/exec/obidos/tg/detail/-/0672325616/qid=1131379392/sr=8-1/ref=pd_bbs_1/104-0899624-4925509?v=glance&s=books&n=507846

Good article
http://www.phppatterns.com/docs/develop/unit_testing_in_php

Good book with all the concepts explained in a general enough way that 
they can be applied to any language.
http://www.amazon.com/exec/obidos/tg/detail/-/0321146530/qid=1131378645/sr=8-2/ref=pd_bbs_2/104-0899624-4925509?v=glance&s=books&n=507846

Jason Sweat's book has a chunk of chapter one that goes over unit testing
http://www.phparch.com/shop_product.php?itemid=96

Just found the PHPUnit Pocket Guide
http://www.phpunit.de/pocket_guide/index.en.php

Fred





More information about the UPHPU mailing list