sebastianbergmann/phpunit — pull request #797 by cspray (2013-01-30 00:44:25+00:00)
Title: Refactor bootstrap running test in separate process

Right now the code template used to run a test in a separate process only includes the configured bootstrap if preserving global state has set to be preserved through `PHPUnit_Framework_TestCase::setPreserveGlobalState()`. I feel this is a bug and likely not intended behavior by the calling code. Although global state might not need to be preserved the test case being ran in the separate process still needs to be bootstrapped.

This pull request:

- Adds a new template value 'bootstrapPath' and conditionally requires file based on this value
- Adds `PHPUnit_Util_GlobalState::getPhpUnitBootstrap()` public method to retrieve bootstrap path
- Adds tests for TestCase to ensure the template being rendered includes the appropriate 'bootstrapPath' value regardless of preserving global state

---

Although this fixes the problem of code in separate processes having bootstrap included this does not remove the dependency on global state to retrieve the bootstrap path. It may be worthwhile to consider removing this dependency at some point. My pull request does not include this because this is my first contribution to the project so didn't want to make drastic changes.