wordpress plugin phpunit starter
1.0.0
This repository provides a starter kit for unit testing WordPress plugins using PHPUnit.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Travis CI Configuration
A ready to use .travis.yml
configured with a reasonable test matrix
Just Add Tests
This project includes a working example test-example.php
test case. Adding tests is as simple as adding methods to this example class! Getting up and running couldn't be easier.
git clone https://github.com/devkabir/phpunit-starter-for-wordpress-plugin.git
composer install
cd phpunit-starter-for-wordpress-plugin
tests/wp-config.php
as necessary.mysqladmin create wp_phpunit_tests -u root
The database name defaults to wp_phpunit_tests
, but you can change this in the tests/wp-config.php
without affecting the Travis configuration which is environment variable-based.
composer test