Improved docs

This commit is contained in:
Dmitry Khomutov 2016-07-19 15:12:28 +06:00
commit 320a249153
49 changed files with 454 additions and 193 deletions

View file

@ -1,9 +1,17 @@
Plugin PHPUnit
--------------
Runs PHPUnit tests against your build.
## Configuration
Configuration
=============
### Options
Has two modes:
#### phpunit.xml Configuration File
Its activated if you have phpunit.xml file in your build path, `tests/` subfolder, or you specify it as a parameter:
* **config** - Optional - Path to a PHP Unit XML configuration file.
* **run_from** - Optional - When running PHPUnit with an XML config, the command is run from this directory
@ -11,12 +19,14 @@ Its activated if you have phpunit.xml file in your build path, `tests/` subfolde
* **path** - Optional - In cases where tests files are in a sub path of the /tests path, allows this path to be set in the config.
#### Running Tests By Specifying Directory
* **directory** - Optional - The directory (or array of dirs) to run PHPUnit on
Both modes accept:
* **args** - Optional - Command line args (in string format) to pass to PHP Unit
### Examples
Specify config file and test directory:
```yml
test:
@ -26,7 +36,9 @@ test:
path: "app/tests/"
```
## Troubleshooting
Troubleshooting
===============
If standard logging of PHPCI is not enough, to get standard output from any command, including PHPUnit, edit `BaseCommandExecutor::executeCommand()` to see what exactly is wrong
* Run `composer update` in phpunit plugin directory of PHPCI to get all of its dependencies
* If phpunit is inside of the project's composer.json, it might interfere with PHPCI's phpunit installation