In need for a site that explains how to use PHPUni

2020-02-28 05:25发布

问题:


Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 6 years ago.

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.

回答1:

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.



回答2:

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. :)



回答3:

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



回答4:

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.



回答5:

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.



回答6:

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