PHPUnit test suite include path. The best place to set your PHP include path is in your bootstrap file. Usually, your phpunit.xml file will include a bootstrap attribute:
1 2 3 4 5 6 7 | <phpunit backupGlobals="true" backupStaticAttributes="false" bootstrap="bootstrap.php" cacheTokens="true" colors="true" ... and so on ... </phpunit> |
Then in your bootstrap file you can set include paths, include important files, etc..
1 | set_include_path(get_include_path() . PATH_SEPARATOR . '../my/sources'); |
The config file is covered in Appendix C of the PHPunit docs.
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.