The purpose of these lessons is to get a conceptual understanding of PHPUnit Testing using WP_PHPUnit for WordPress Plugin / Theme. These lessons are aimed at Beginner – Intermediate developers who are familiar with the PHPUnit Framework.
Pre-Requisites ✅
- Knowledge of WordPress Development
- These lessons are aimed to help developers write Unit Tests for WordPress Plugins / Themes. It is a mandatory requisite to know at least basic WordPress Development
- You can learn WordPress development from here: https://developer.wordpress.org/
- Knowledge of writing basic PHPUnit Test
- As WP PHPUnit is built upon PHPUnit we need to be familiar with PHP Unit Framework first in order to use WP PHP Unit framework.
- You can learn PHP Unit from here: https://phpunit.de/
- Using Composer & NPM
- Composer is a tool package manager for PHP Frameworks / Libraries like PHPUnit, WP PHPUnit
- NPM is a package manager for JS frameworks / libraries
- Learn more about composer here: https://getcomposer.org/
Learn more about NPM here: https://www.npmjs.com/
Objectives 🎯
After completing these lessons you will be able to:
- Setup WP PHPUnit Testing Environment for Plugins / Themes.
- Choose the right test cases for WordPress Plugin / Themes.
- Write Unit Tests for plugin using WP PHPUnit framework.
- Write Efficient & Test-Driven code.