PHPUnit集成到NetBeans 7中 [英] PHPUnit Integration into NetBeans 7
问题描述
我正在尝试使PHPUnit在Netbeans中工作.我使用的是3.4.9,但拒绝运行,建议升级到最新版本.我现在已经升级到3.5.15,当我运行它时,我收到以下消息:
I am trying to get PHPUnit working in Netbeans. I was using 3.4.9 but that refused to work and it was suggested to upgrade to the latest version. I have now upgraded to 3.5.15 and when I run it I get the following message:
unrecognized option --log-xml
我知道这不是有效的日志记录选项,但是我不知道在哪里设置或如何更改它.我的phpunit.xml文件是:
I understand that this is not a valid logging option, however I do not know where this is being set or how to change it. My phpunit.xml file is:
<phpunit bootstrap="./application/bootstrap.php" colors="true">
<testsuite name="Personal Development">
<directory>./</directory>
</testsuite>
<filter>
<whitelist>
<directory suffix=".php">../application/</directory>
<exclude>
<file>../application/Bootstrap.php</file>
<file>../application/controllers/ErrorController.php</file>
<directory suffix=".phtml">../application/</directory>
</exclude>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="./log/report" charset="UTF-8"
yui="true" highlight="true" lowUpperBound="50" highLowerBound="80"/>
<log type="testdox-html" target="./log/testdox.html" />
</logging>
</phpunit>
如何解决此错误?
推荐答案
为了强制PHPUnit使用正确的文件,我不得不右键单击项目名称,设置配置",自定义","PHPUnit",然后隐式指定引导程序和XML Config文件.
In order to force PHPUnit to use the correct files, I had to right click on the project name, Set Configuration, Customize, PHPUnit, then specify implicitly where the bootstrap and XML Config files were.
这篇关于PHPUnit集成到NetBeans 7中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!