OSDN Git Service

Add instructions for running tests to README.md
authorMichael Williamson <mike@zwobble.org>
Thu, 13 Dec 2012 11:37:30 +0000 (11:37 +0000)
committerMichael Williamson <mike@zwobble.org>
Thu, 13 Dec 2012 11:37:30 +0000 (11:37 +0000)
README.md

index 1095531..3121780 100644 (file)
--- a/README.md
+++ b/README.md
@@ -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
+
+