I\'m trying to use PHPunit to test a class that outputs some custom headers.
The problem is that on my machine this:
An alternative solution to @runInSeparateProcess is to specify the --process-isolation option when running PHPUnit:
name@host [~/test]# phpunit --process-isolation HeadersTest.php
That is analogous to set the processIsolation="true" option in phpunit.xml.
This solution has similar advantages/disadvantages to specifying the --stderr option, which however did not work in my case. Basically no code changes are necessary, even though there may be a performance hit due to running each test in a separate PHP process.