4 So you've got an awesome idea to throw into WP-CLI. Great! Here's the process, in a nutshell:
6 1. [Fork](https://github.com/wp-cli/wp-cli/fork) the repository.
7 2. Make the code changes in your fork.
8 3. Open a pull request.
10 It doesn't matter if the code isn't perfect. The idea is to get feedback early and iterate.
12 If you're adding a new feature, please add one or more functional tests for it in the `features` directory. See below.
14 Also, please create or update the appropriate `.txt` file in the `man-src` directory. See below.
16 Lastly, please follow the [WordPress Coding Standards](http://make.wordpress.org/core/handbook/coding-standards/).
21 There are two types of tests:
23 * unit tests, implemented using [PHPUnit](http://phpunit.de/)
24 * functional tests, implemented using [Behat](http://behat.org)
26 All the test dependencies can be installed using [Composer](http://getcomposer.org/):
28 php composer.phar install --dev
32 To run the unit tests, just execute:
38 Before running the functional tests, you'll need a MySQL user called `wp_cli_test` with the
39 password `password1` that has full privileges on the MySQL database `wp_cli_test`.
40 Running the following as root in MySQL should do the trick:
42 GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1";
44 Then, to run the entire test suite:
46 vendor/bin/behat --expand
48 Or to test a single feature:
50 vendor/bin/behat features/core.feature
52 More info can be found from `vendor/bin/behat --help`.
57 Thanks! Hacking on WP-CLI should be fun. If you find any of this hard to figure
58 out, let us know so we can improve our process or documentation!