WordPress is a tightly-coupled system, representing over a decade and a half of ideas, decisions, technological shifts, and ideological struggles. There's a lot of history to be parsed and often the simplest task can have unintended consequences.
Meanwhile, automated testing is one of the best ways to ensure software can be released regularly with high confidence and low risk of regressions. Sadly, the leap from "building WordPress plugins" to "building WordPress plugins with tests" is often viewed as a challenging hurdle. Luckily, there are tools to set up a test harness within an existing codebase with ease.
This talk introduces the fundamentals of automated testing, especially within the context of WordPress. After developing an understanding why automated testing is so critical, attendees will learn how to begin testing their plugins and themes, using features found both in PHPUnit and the WordPress core testing framework, to build and release quality software.
✨ View slides ✨
- PHPUnit
- WordPress automated testing docs
- The Five Types of Test Doubles and How to Create them in PHPUnit
- Mockery
- PHPUnit Markup Assertions
- Trac ticket #46149: PHPUnit 8.x support
- WordCamp US 2019 — November 2, 2019 (PDF)
- Cascadia PHP 2019 — September 20, 2019 (PDF, Joind.in)
- WordCamp Grand Rapids 2019 — July 13, 2019 (PDF)
- WordCamp Kent 2019 — June 15, 2019 (PDF)
- WordCamp Dayton 2019 — March 2, 2019 (PDF)
- Struggle Wapuu by Michelle Schulp