Dummy plugin for demonstrating WP_Mock unit testing in a WordPress Plugin
First, clone this repository to your wp-content/plugins:
git clone https://github.com/codex-m/wp-mock-test-demo.gitThen go to wp-content/plugins/wp-mock-test-demo/ in terminal to install third party libraries with:
composer installFinally, you can run the test inside the wp-content/plugins/wp-mock-test-demo directory in terminal:
./vendor/bin/phpunit --configuration phpunit.xmlFor details, please follow this tutorial.