Skip to content
Dummy plugin for demonstrating WP_Mock unit testing in a WordPress Plugin
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
includes
unit-tests
.gitignore
LICENSE
README.md
composer.json
composer.lock
phpunit.xml
wp-mock-test-demo.php

README.md

wp-mock-test-demo

Dummy plugin for demonstrating WP_Mock unit testing in a WordPress Plugin

Installation

First, clone this repository to your wp-content/plugins:

git clone https://github.com/codex-m/wp-mock-test-demo.git

Then go to wp-content/plugins/wp-mock-test-demo/ in terminal to install third party libraries with:

composer install

Finally, you can run the test inside the wp-content/plugins/wp-mock-test-demo directory in terminal:

./vendor/bin/phpunit --configuration phpunit.xml

For details, please follow this tutorial.

You can’t perform that action at this time.