1. An Introduction – Explains what they are, why they matter, and gives a brief example.
2. Setting Up Our Testing Suite – Defines “testing suite”, installing PHPUnit and WP-CLI, how to use WP-CLI to setup unit tests, defines “tests” and “assertions”.
3. Writing Tests – Why/how to segment tests across multiple files, demonstrates writing several different tests.
4. The Factory – Discusses using WP_UnitTest_Factory to create sample data. Particularly demonstrates how to create a sample post / many sample posts / a sample user, creating a custom factory class.
Explains the why of unit testing, discusses requirements including OS, PHP versions, Composer, PHPUnit, and WP-CLI. It also discusses PHP-Mock, test doubles, using a prefix helper function, and assertions.
WP Safe Updates – In cases where a host doesn’t offer a staging environment, WP Safe Updates create a sandbox environment so that plugins can be tested before upgrading.