mirror of
https://fast.feibisi.com/https://github.com/wp-cli/scaffold-command.git
synced 2025-10-04 17:01:28 +08:00
commit
38e4887363
2 changed files with 10 additions and 7 deletions
15
README.md
15
README.md
|
@ -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
|
||||
|
|
|
@ -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" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue