2013年3月5日星期二

Juan Treminio: Unit Testing with PHPUnit Tutorial Series


Juan Treminio has a series of new posts over on his site - a three part series covering unit testing with PHPUnit. There's three parts to the series (right now) covering everything from an intro to PHPUnit out to some more advanced techniques.



For months now I have been telling myself I would create an in-depth, multi-part series of articles that would take a developer from being a complete newbie at testing to have them mocking classes left and right and asserting until the break of dawn. This series will introduce you to the core concepts of testing. It will tell you why statics are bad, why dependency injection is king, what the difference between a mock and a stub is and how to love the red and green bar.

The three parts of the series he's posted are:


1 条评论:

  1. This article on PHP Unit testing using PHPUnit 7 is also great for beginners. It starts with the basics of unit testing and how to install PHPUnit and write a test case using it.

    回复删除