Unit testing 带标头异常的PHPUnit输出(--stderr无结果)
使用zend&phpunit进行测试时。控制台上显示标题错误。 我发现错误:Unit testing 带标头异常的PHPUnit输出(--stderr无结果),unit-testing,zend-framework,testing,phpunit,Unit Testing,Zend Framework,Testing,Phpunit,使用zend&phpunit进行测试时。控制台上显示标题错误。 我发现错误: Cannot modify header information - headers already sent by (output started at /usr/share/php/PHPUnit/Util/Printer.php:173) 我尝试使用某个主题中的说明进行调试 和 . 但是当使用--stderr选项时,我找不到testcase的一些输出和报告。 这是控制台上的输出: root@ubuntu:/ho
Cannot modify header information - headers already sent by (output started at /usr/share/php/PHPUnit/Util/Printer.php:173)
我尝试使用某个主题中的说明进行调试
和
.
但是当使用--stderr选项时,我找不到testcase的一些输出和报告。
这是控制台上的输出:
root@ubuntu:/home/boingonline/www/testunit# phpunit --stderr
PHPUnit 3.5.15 by Sebastian Bergmann.
root@ubuntu:/home/boingonline/www/testunit#
对这个问题有什么想法吗?谢谢你的回答。这是一个很好的回答。无论何时输出内容(即使是在CLI上,这就是问题所在),都不能再使用header()
调用
解决方法是使用进程隔离进行测试