WPCeption is a custom build of Codeception for testing WordPress plugin and themes.
The current version of WordPress Unit Tests Library for WordPress 5.3.2 (the latest as of 2020/01/18) is constrained to PHPUnit 7.x. while Codeception 4.0.2 uses PHP Unit 8.x.
This creates a difficult situation for WordPress plugin/theme developers to use Codeception for their test tool.
So this custom build solves the incompatibility issue.
Download the wpcept.phar file and place it in a working test directory.
Same as Codeception.
$ php wpcept.phar -V
$ php wpcept.phar bootstrap
$ php wpcept.phar run
- Codeception 4.0.2
- PHPUnit 7.5.20
- Clone this repository to local.
- Run Composer to download Codeception, PHPUnit v7.x, and their dependencies.
$ composer install
- Download the phar archiver box.phar.
- From the repository root directory, run
$ php box.phar compile
build/wpcept.phar
will be created. Change the configurations withbox.json
as you need.
Licensed under MIT.