wp-cli/wp-cli — pull request #565 by scribu (2013-11-25 06:51:36+00:00)
Title: unit tests WP_TESTS_DIR env var necessary

Am running the unit tests and wondering if there was need for the `WP_TESTS_DIR` env var. Currently the env var is specified to be declared on the command line with every call to `phpunit` according to the [docs](http://wp-cli.org/blog/plugin-unit-tests.html)

running `phpunit` from a plugin that was scaffolded with the `wp scaffold plugin-tests` will return the following error:
```log
PHP Fatal error: require_once(): Failed opening required '/includes/functions.php'
```
This may confuse most non-technical wordpress users.

Suggestion:
Seeing as how the `unit-tests` are, by default, in the `blog_root/unit-tests` dir, think we should check if the env var `WP_TESTS_DIR` exists, if not then look for `ABSPATH/unit-tests` folder, if not default to throw exception.

in [bootstrap.php](https://github.com/wp-cli/wp-cli/blob/master/templates/bootstrap.mustache)
```php