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.
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.
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.
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 andZend_Test
.For information about PHPUnit, be sure to read the documentation. It does not look too bad IMO. There is a blog entry about Automatic testing of MVC applications created with Zend Framework which looks quite good, too. :)
There is also an "Introduction to the Art of Unit Testing" posted on the Zend Developer Zone, which covers PHPUnit with Zend specifically.
A great tutorial (git-based, exercise based), on physically going through the motions of testing by Sebastian Marek: https://github.com/proofek/phpnw12-tutorial
Found it very helpful for very baseline beginners. The slides: http://www.slideshare.net/proofek/test-your-code-like-a-pro-phpunit-in-practice
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.