我一直在尝试echo
东西在我的phpunit测试中,但没有运气到目前为止。在phpunit测试中回显
我读了关于xml配置文件的文档,显然debug
参数是我在找的。不幸的是它仍然不起作用。总之,这里是我的xml配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true"
processIsolation="true"
verbose="true"
debug="true">
</phpunit>
两个processIsolation
和verbose
被接受,但debug
不是。
phpunit --debug MyTest.php # here stuff is echoed correctly
,但使用XML配置文件,它看起来像它被忽略了:
,当我直接将它传递给PHPUnit的这样的命令实际上工作得很好。
我在3.6.3已经让我不能说。你是如何启动OutputTestCase的?因为如果你推出它与 phpunit --debug OutputTestCase.php 然后是它的工作,但否则它不。 – nourdine 2012-01-11 08:56:10
就像我说你**需要**'phpunit> 3.6.4'这个工作。使用3.6.3,你将不会得到那个输出,而不运行--debug。如果你升级它将会像PHPUnit中的行为改变一样工作:) – edorian 2012-01-11 09:01:30
为什么它值得这个版本在4.1版上似乎没有任何作用,即使使用了--debug选项... – 2014-05-18 20:00:17