【发布时间】:2016-07-15 15:49:48
【问题描述】:
我正在为一个网站实施一些测试。 在特定的测试中,出现了这样的结果:
{
"event": "test",
"suite": "Example_V_test",
"test": "Example_V_test::test_3",
"status": "error",
"time": 13.469105958939,
"trace": [
{
"file": "\/opt\/lampp\/htdocs\/buy\/application\/tests\/phpunit.phar",
"line": 569,
"function": "main",
"class": "PHPUnit_TextUI_Command",
"type": "::"
}
],
"message": "Risky Test: Test code or tested code did not (only) close its own output buffers",
"output": ""
}R 3 / 3 (100%)
Time: 25.76 seconds, Memory: 59.25MB
There was 1 risky test:
1) Example_V_test::test_3
Test code or tested code did not (only) close its own output buffers
/opt/lampp/htdocs/buy/application/tests/phpunit.phar:569
OK, but incomplete, skipped, or risky tests!
我的问题是:如何找到导致此“问题”的代码行?
【问题讨论】:
-
您可以在错误日志中找到它。
-
在哪里可以找到错误日志?我正在测试一个使用 codeigniter 构建的站点,但在包含 phpunit.phar 文件的目录中没有找到它,即:/opt/lampp/htdocs/codeigniter/application/tests。另外,我查看了 codeigniter/application/log 文件夹,这里没有 phpunit 测试的输出。
-
/var/log/apache2/error_log。试试吧兄弟xD
-
我明白了。在我的情况下,它是 /opt/lampp/logs/error.log 文件,但是 phpunit test 没有输出...