PHPUnit is considered by many to be the leading tool for testing PHP code. This “Short, Fast, Focused” book (82 pages digital, 69 pages in paperback) is a recent addition to Packt Publishing’s “Instant” series. It zeroes in on how to install and use PHPUnit to create and run “easy-to-maintain tests.”
One strength of Michael Lively’s new book is his experience with PHP and PHPUnit. Another strength is the book’s step-by-step structure. It rates each key step as “Simple”, “Intermediate”, or “Advanced” and provides subheadings such as “Getting ready…”, “How to do it…”, “How it works…”, and “There’s more…” to help keep descriptions short and clear.
Code examples and screenshots also help the reader get comfortable with running tests using the PHPUnit framework.
Aside from skipping commas in some of the text, Michael Lively’s writing is clear and concise, and his descriptions and code examples have been reviewed by two experienced software developers.
The book is “written for anyone who has an interest in unit testing but doesn’t necessarily know where to start in integrating it with their project,” Lively states.
“It will provide useful tips and insights into how PHPUnit can be used with your projects and it should give you enough information to whet your appetite for the various features offered by PHPUnit.”
The code examples in Lively’s book “were written using PHP 5.3.24 and PHPUnit 3.7. All code samples were verified against a Linux box with Ubuntu 12.04 LTS.”
As with several other Packt books recently reviewed, if you use a Windows PC or a Mac instead of a Linux system, you pretty much are left on your own to figure out the installation process and certain commands.
— Si Dunn