I\'m starting to write PHPUnit tests and I\'d like the tests to be run from developers machines as well as from our servers. Developers machines are set up differently than
An elegant way to pass variables to both bootstrap files as well as to test files is by using environment variables:
export MY_ENV_VAR="some value"
phpunit all
Then, in your PHP files, you can access it like this:
getenv('MY_ENV_VAR')
Source: http://blog.lysender.com/2010/10/phpunit-passing-environment-variable-to-your-application/