tp5单元测试遇到session报错

浏览:3263 发布日期:2018/03/16 分类:求助交流 关键字: tp5 单元测试 session
tp5单元测试,遇到程序中用到session时会报错,因为单元测试本身有信息输出,在session_start()之前。
错误信息:
session_start(): Cannot send session cookie - headers already sent by (output started at E:\workspace\wallet\vendor\phpunit\phpunit\src\Util\Printer.php:135)[E:\workspace\wallet\thinkphp\library\think\Session.php:167]
session_start(): Cannot send session cache limiter - headers already sent (output started at E:\workspace\wallet\vendor\phpunit\phpunit\src\Util\Printer.php:135)[E:\workspace\wallet\thinkphp\library\think\Session.php:167]

请问有没有大神知道怎么解决?(我把源码中信息输出的代码注释就好了,但是如果有错误就看不到了)
最佳答案
评论( 相关
后面还有条评论,点击查看>>