Create "composer test" command in order to run phpunit tests

As the project already is installed via composer, this command
could save a few keystrokes!

Besides that, is just one command for all OS, because will not be
needed to change slashes to backslashes in Windows.

*X      (21 keystrokes): `./vendor/bin/phpunit`
Windows (21 keystrokes): `.\vendor\bin\phpunit`
New (14 keystrokes):     `composer test`

https://getcomposer.org/doc/articles/scripts.md#writing-custom-commands
This commit is contained in:
Rogerio Prado de Jesus 2015-10-19 10:12:55 -02:00
parent 477b1458bf
commit e44b93f055
2 changed files with 15 additions and 0 deletions

View file

@ -187,6 +187,12 @@ You can test the project using the commands:
$ vendor/bin/phpunit
```
or
```sh
$ composer test
```
### Windows
You can test the project using the commands:
@ -194,6 +200,12 @@ You can test the project using the commands:
> vendor\bin\phpunit
```
or
```sh
> composer test
```
No test should fail.
You can tweak the PHPUnit's settings by copying `phpunit.xml.dist` to `phpunit.xml`

View file

@ -45,5 +45,8 @@
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"scripts": {
"test": "./vendor/bin/phpunit"
}
}