Learn how a Grumpy Programmer approaches improving his own codebase, including all of the tools used and why.

I feel that testing, as a concept, is hard to explain to beginning programmers: “we are going to write code that is going to make sure your other code works as expected”. The assumption that underlies all this is that you already understand how to write computer programs in your chosen language! This makes it very difficult to teach to beginner or inexperienced programmers. When you combine this with how PHP does not force any particular structure on you, you have an environment where only the folks who are really motivated end up learning about testing.

The Complementary PHP Testing Tools Cookbook is my way to try and provide additional tools to PHP programmers who already have experience writing tests but want to improve. I believe that by learning the skills (both technical and core) surrounding testing you will be able to write tests using almost any testing framework and almost any PHP application.

Throughout this book, I am going to show you how I am adding targeted test coverage to my oldest, still-in-use PHP-based web application. It has been running since 2004, with me updating the base framework, CakePHP, every few years.