When I call header() inside a unit test, I am told that phpunit has already set HTTP headers:
Cannot modify header information - headers already sent by (output started at /usr/share/pear/PHPUnit/Util/Printer.php:172)
Full report is at: http://stackoverflow.com/questions/20076467/why-does-phpunit-interfere-with-setting-http-headers-in-this-code
This is phpunit 3.7.19 on CentOS 6.