Skip to content

Commit 9de404d

Browse files
committed
update utils/dev-build
1 parent 2164258 commit 9de404d

2 files changed

Lines changed: 14 additions & 22 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
composer.lock
2-
composer.phar
32
/vendor
3+
/*.phar
44
/phpunit.xml

CONTRIBUTING.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,28 @@ Lastly, please follow the [WordPress Coding Standards](http://make.wordpress.org
1616
Running and writing tests
1717
-------------------------
1818

19-
There are two types of tests:
19+
There are two types of automated tests:
2020

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

24-
### Unit tests
25-
26-
Assuming you have `~/.wp-cli/bin/` in your PATH, you can do:
24+
To set everything up, just run:
2725

2826
```bash
29-
# Install PHPUnit
30-
curl http://pear.phpunit.de/get/phpunit.phar > ~/.wp-cli/bin/phpunit
31-
chmod +x ~/.wp-cli/bin/phpunit
27+
./utils/dev-build
28+
```
3229

33-
To run the unit tests, just execute:
30+
### Unit tests
3431

35-
phpunit
32+
The unit test files are in the `tests/` directory.
3633

37-
The test files are in the `tests/` directory.
34+
To run the unit tests, just execute:
35+
36+
php phpunit.phar
3837

3938
### Functional tests
4039

41-
Assuming you have `~/.wp-cli/bin/` in your PATH, to install Behat, you can do:
42-
43-
```bash
44-
curl http://behat.org/downloads/behat.phar > ~/.wp-cli/bin/behat
45-
chmod +x ~/.wp-cli/bin/behat
46-
```
40+
The functional test files are in the `features/` directory.
4741

4842
Before running the functional tests, you'll need a MySQL user called `wp_cli_test` with the
4943
password `password1` that has full privileges on the MySQL database `wp_cli_test`.
@@ -53,15 +47,13 @@ Running the following as root in MySQL should do the trick:
5347

5448
Then, to run the entire test suite:
5549

56-
behat --expand
50+
php behat.phar --expand
5751

5852
Or to test a single feature:
5953

60-
behat features/core.feature
61-
62-
More info can be found from `vendor/bin/behat --help`.
54+
php behat.phar features/core.feature
6355

64-
The feature files are in the `features/` directory.
56+
More info can be found from `php behat.phar --help`.
6557

6658
Finally...
6759
----------

0 commit comments

Comments
 (0)