PHPackages                             rosio/wordpress-testing-harness - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. rosio/wordpress-testing-harness

ActiveLibrary

rosio/wordpress-testing-harness
===============================

Makes testing plugins and themes with WordPress and Composer much easier

v1.1.1(11y ago)145PHP

Since Jun 10Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Rosio/wordpress-testing-harness)[ Packagist](https://packagist.org/packages/rosio/wordpress-testing-harness)[ RSS](/packages/rosio-wordpress-testing-harness/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

WordPress Testing Harness
=========================

[](#wordpress-testing-harness)

This library is meant to make it easier to test plugins and themes with the WordPress runtime via PHPUnit.
This is basically just a rewrite of [kurtpayne/wordpress-unit-tests](https://github.com/kurtpayne/wordpress-unit-tests).

Usage:
------

[](#usage)

1. Add this library, your testing library, and your WordPress deployment of choice to your plugin or themes composer.php:

    ```
    	"autoload-dev": {
    		"psr-4": {
    			"Plugin\\SomePlugin\\": "tests/"
    		}
    	},
    	"require-dev": {
    		"phpunit/phpunit": "~3.7",
    		"rosio/wordpress-testing-harness": "dev-master",
    		"johnpbloch/wordpress": "~3.8"
    	},
    ```

    You don't actually have to include WordPress, and instead have it download to the correct folder during testing (which means you can then test multiple versions of WordPress easily), but it's recommended to add one for easy local testing.
2. Configure your phpunit.xml.dist

    ```

                ./tests/

    ```
3. Configure your phpunit's tests/bootstrap.php file:

    ```
