| 1 |
How to run the tests |
| 2 |
==================== |
| 3 |
|
| 4 |
Prerequisites: |
| 5 |
-------------- |
| 6 |
|
| 7 |
Download composer and update dev dependencies. |
| 8 |
:: |
| 9 |
|
| 10 |
php composer.phar update |
| 11 |
|
| 12 |
Run the recommended tests: |
| 13 |
-------------------------- |
| 14 |
|
| 15 |
It is recommended to launch these tests at least once to ensure this library will work properly on your configuration. |
| 16 |
:: |
| 17 |
|
| 18 |
vendor/phpunit/phpunit/phpunit --group recommended --exclude-group ignore --bootstrap tests/config.php tests |
| 19 |
|
| 20 |
Run a specific test: |
| 21 |
-------------------- |
| 22 |
|
| 23 |
You can run a specific test adding a filter to the previous command. |
| 24 |
:: |
| 25 |
|
| 26 |
vendor/phpunit/phpunit/phpunit --filter CardTest --group unit --exclude-group ignore --bootstrap tests/config.php tests |
| 27 |
|
| 28 |
Run specific groups of test |
| 29 |
--------------------------- |
| 30 |
|
| 31 |
You can filter tests by groups: |
| 32 |
:: |
| 33 |
|
| 34 |
# Run unit tests |
| 35 |
vendor/phpunit/phpunit/phpunit --group unit --exclude-group ignore --bootstrap tests/config.php tests |
| 36 |
|
| 37 |
# Run functional tests |
| 38 |
vendor/phpunit/phpunit/phpunit --group functional --exclude-group ignore --bootstrap tests/config.php tests |
| 39 |
|
| 40 |
# Run unit tests and functional tests |
| 41 |
vendor/phpunit/phpunit/phpunit --group unit,functional --exclude-group ignore --bootstrap tests/config.php tests |
| 42 |
|