Merge pull request #306 from wp-cli/behat

Stop using PHPUnit Story
This commit is contained in:
Cristi Burcă 2013-02-16 15:12:31 -08:00
commit 38e4887363
2 changed files with 10 additions and 7 deletions

View file

@ -27,8 +27,12 @@ If you want to receive an email for every single commit, you can subscribe to th
Running tests
-------------

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

* unit tests, implemented using [PHPUnit](http://phpunit.de/)
* functional tests, implemented using [Behat](http://behat.org)

All the test dependencies can be installed using [composer](http://getcomposer.org/):

composer.phar install --dev

@ -39,11 +43,10 @@ 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:
Finally, to run the unit tests:

vendor/bin/phpunit

Most tests install WordPress from scratch. Since this is pretty slow, you can
use arguments to `phpunit` to only run the test that you're interested in:
And to run the functional tests:

vendor/bin/phpunit --filter test_function_you_want_to_run
vendor/bin/behat

View file

@ -14,7 +14,7 @@
},
"require-dev": {
"phpunit/phpunit": "3.7.x",
"phpunit/phpunit-story": "1.0.x"
"behat/behat": "2.4.*@stable"
},
"autoload": {
"psr-0": { "WP_CLI": "php" }