Covering both the technical and core skills, this book has what you need to learn in order to make testing just a thing you do instead of a thing you struggle with.
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 Grumpy Programmer’s Guide To Testing PHP Applications is my way to try and provide some help for developers who are looking to become more test-centric and reap the benefits of automated testing and related tooling like static analysis and automation. 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.
The book combines all the material from my previous books, adds new material, and revisits some old topics where my experiences have changed my thoughts. I break the vast topic of testing into smaller chunks, along with providing lots of examples and explanations of how I approach testing applications. Some of the things I cover are:
- Test-Driven development
- Strategies for Test-After practices
- Test refactoring strategies
- How PHPUnit itself works
- Complementary tools and approaches like static analysis and mutation testing
- Learning the core skills you need to get other people testing their code
The Grumpy Programmer’s Guide To Testing PHP Applications is designed to be the book you refer to over and over again to not only learn how to test your PHP applications but to also remind yourself about techniques and tools that lead to successful outcomes. All I’ve ever wanted to do is get more people testing their code so we can concentrate on solving problems instead of constantly fixing bugs that we might’ve caught earlier.
About the php[architect] print edition
This edition of the book lays out the book with attention to detail, includes syntax highlighted code samples, and adds an index of key words.