Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/wp-development-courses/wp-php-unit-testing-explained/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
wp-php-unit-testing-explained
Source code and exercises for the WP PHP Unit Testing Explained course
Running the tests
- V1: composer run test -- --testsuite=byline-v1
- V2: composer run test -- --testsuite=byline-v2
- V3a: composer run test -- --testsuite=byline-v3a
- V3b: composer run test -- --testsuite=byline-v3b
- V3c: composer run test -- --testsuite=byline-v3c
- V4a: composer run test -- --testsuite=byline-v4a
- V4b: composer run test -- --testsuite=byline-v4b
- V4c: composer run test -- --testsuite=byline-v4c
Exercises
- Exercise: Using Assertions: composer run test -- --testsuite=exercise-assertions-solution
- Exercise Solution: Using Assertions: composer run test -- --testsuite=exercise-assertions-solution
- Exercise: Database fixtures: composer run test -- --testsuite=exercise-database-fixtures
- Exercise Solution: Database fixtures: composer run test -- --testsuite=exercise-database-fixtures-solution
- Exercise: Shared database fixtures 1: composer run test -- --testsuite=exercise-shared-database-fixtures-1
- Exercise Solution: Database fixtures 1: composer run test -- --testsuite=exercise-shared-database-fixtures-1-solution
- Exercise: Shared database fixtures