I'm testing a suite of REST web services with PHPUnit. We're using output buffering in order to gzip-encode the responses. When I run a test for the service with PHPUnit, I'm getting the error:
Cannot modify header information - headers already sent by (output started at /home/dotcloud/php-env/share/php/PHPUnit/Util/Printer.php:172)
It's complaining at the point that my code echo's the output to the browser...
I was able to work around this temporarily by adding an ob_start()
call at the top of the test class(es), but when I run multiple tests at once, I get this error again.
Any ideas?
echo
but if you don't show any code, we will not be able to help you further than that – Snocat