/wpception

Codeception fork utilized for testing WordPress related development

Primary LanguagePHPMIT LicenseMIT

WPCeption

WPCeption is a custom build of Codeception for testing WordPress plugin and themes.

Background

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

Download the wpcept.phar file and place it in a working test directory.

Usage

Same as Codeception.

$ php wpcept.phar -V 
$ php wpcept.phar bootstrap 
$ php wpcept.phar run 

Included Versions

Create Your Own Build

  1. Clone this repository to local.
  2. Run Composer to download Codeception, PHPUnit v7.x, and their dependencies.
$ composer install
  1. Download the phar archiver box.phar.
  2. From the repository root directory, run
$ php box.phar compile
  1. build/wpcept.phar will be created. Change the configurations with box.json as you need.

License

Licensed under MIT.