Buy PDF/epub/mobi (sample chapter available there)

Buy via Amazon.com for your Kindle

Buy via Apple's iBooks store

Buy paperback via Lulu

Do you help organize a PHP user group? Send an email to chartjes@littlehart.net about your user group and I will arrange to get you a copy of the ebook to give away for free at your next meeting. I can also be found on Twitter and you can find out about other stuff I'm interested in on my blog

Reader Brian Zwahr has posted a review of my book:

Overall I would recommend this book, though potential readers should not esxpect a cookbook with a lot of example code.

Brandon Savage has written a review of my book:

Writing tests is certainly hard; Chris makes no bones about this. But testing is made unnecessarily difficult by bonehead developers who consistently write applications that are resistant or impossible to test. It is in this framework, then, that Chris focuses most of his energies: writing (or rewriting) an application to be testable. Rather than embracing a particular methodology, framework or behavior, Chris adopts the tactics and techniques that work to build applications that can be tested, and shows exactly how to test them along the way.

There are plenty of books that show the aspiring PHP programmer how to use testing tools. But how do you actually build your application in such a way that using the testing tools is easy instead of a constant struggle?

The guide is aimed at helping intermediate level programmers build applications that should be easier to test and hopefully to maintain. My goal is to show you that it really isn't a lot of extra work to create an application that consists of small modules of code that know how to speak to each other in order to solve larger problems. You'll learn why automated testing can be an essential tool and how your choice of components for your application makes all the difference in your pursuit of releasing bug-free code into production.

Let my programming experiences help you become a better programmer and let you fix problems faster and add new features to your application with confidence.

The guide is broken down into the following sections:

  1. Testing Is Good, Testable Applications Are Better
  2. Building Testable Applications Is Hard
  3. Environmental Consistency
  4. Static Code Analysis
  5. Decoupling Your Objects Using Dependency Injection
  6. Like An Onion, Your Application Has Layers
  7. Shells and Sandboxes
  8. Rebuilding Your Programming and Deployment Environments
  9. Continuous Integration Landscape for PHP Developers
  10. Where Are The Tests?
  11. Advice From A Grumpy Programmer

60 pages of pragmatic but opinionated advice about how to build and test your PHP applications.

Buy PDF/epub/mobi Buy paperback via Lulu