Add instructions for running tests to README.md

This commit is contained in:
Michael Williamson 2012-12-13 11:37:30 +00:00
parent ac7e67b651
commit b023d85c9a

View file

@ -23,3 +23,24 @@ Need even more info?
Read our [wiki](https://github.com/wp-cli/wp-cli/wiki) and find out how to create your own commands with our [commands cookbook](https://github.com/wp-cli/wp-cli/wiki/Commands-Cookbook).

If you want to receive an email for every single commit, you can subscribe to the [wp-cli-commits](https://groups.google.com/forum/?fromgroups=#!forum/wp-cli-commits) mailing list.

Running tests
-------------

The tests use PHPUnit, which can be installed using [composer](http://getcomposer.org/).
Once you've composer installed, run:

composer.phar install --dev

Before running the tests, you'll need a MySQL user called wp_cli_test with the password password1 that
has full privileges on the MySQL database wp_cli_test. Running the following
as root in MySQL should do the trick:

GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost"
IDENTIFIED BY "password1";
Finally, to run the tests:

vendor/bin/phpunit tests