PHPUnit Tutorial For Newbies Links

Unit TestingNo, this is not a tutorial post. I never used PHPUnit and Unit Testing or Test Driven development before. In fact I am learning right now. So, I will point you to 2 great tutorials I found. Let us learn together.

Juan Treminio Unit Testing Tutorial

This is a 5 part tutorial covering PHPUnit from basic installation to advanced unit testing method. The tutorial is well written and very clear. It makes use of composer. Something I am not familiar with.

Sitepoint introduction to unit testing in PHP with PHPUnit

This tutorial is written by Chris Cornutt. He used the PEAR method for installation. The same install method I used to install PHPUnit. His tutorial makes more sense to me. So, I am going to use his method. However he only introduces the basic concept. He does go into several best practices to follow. But his tutorial is not as comprehensive as Juan’s tutorial.

PHPUnit Getting Started Tutorial

All great application always have a tutorial in their documentation. This is the official tutorial. Very basic. A great starting point though. Thanks to @s_bergmann via Twitter.

Now, which one you follow is your personal choice. However these 2 tutorials are those I found to be the best for newbies to start their adventure into Unit Testing in PHP.

Go learn from them and share your experience with us using the comments section below.


This post was updated on 18 Jan with link to PHPUnit Official Tutorial.