views:

772

answers:

5

I am searching for a tutorial (optimally with Zend Framework) on how to use PHPUnit.

I have found a couple on google but have not quiet understood it yet.

+6  A: 

For information about PHPUnit, be sure to read the documentation. It does not look too bad IMO. There is a blog entry about automatically testing MVC applications with Zend Framework which looks quite good, too. :)

hangy
A: 

Simpletest, which is very similar to PHPUnit, but a lot simpler, has a good introductory tutorial. Even if you plan to use PHPUnit, this should teach you the basics of unit testing.

troelskn
+13  A: 

What your are looking for is the Pocket Guide. It explaines how to work with PHPUnit from A to Z in several languages. You can read it online or offline, for free, and it's regularly updated.

e-satis
your link is broken
Andrew
thks, it's fixed.
e-satis
+1  A: 

There is also an "Introduction to the Art of Unit Testing" posted on the Zend Developer Zone, which covers PHPUnit with Zend specifically.

Brian
+1  A: 

If you're looking for a simple introduction to using PHPUnit and Zend_Test with the Zend Framework, I wrote a simple tutorial that covers the basics of setting up PHPUnit and writing a few simple tests both with PHPUnit and Zend_Test.

Andrew