phpstorm和phpunit

前端之家收集整理的这篇文章主要介绍了phpstorm和phpunit前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我创建了一个PHPunit测试文件,当我尝试通过PHPstorm运行它时,我收到消息:

Unable to attach test reporter to test framework or test framework quit unexpectedly

似乎执行以下命令:

/usr/local/bin/PHP /private/var/folders/4b/qrnw7nbd6llgmhRSS5rf1_880000gt/T/ide-PHPunit.PHP  --configuration /Users/Shared/sites/pac/app/app/PHPunit.xml.dist BackendControllerTest /Users/Shared/sites/pac/app/modules/Pac/Backend/Tests/Controller/BackendControllerTest.PHP
Testing started at 23:22 ...

Process finished with exit code 0

当我通过命令行执行此操作时,我得到更多的输出

PHPUnit 3.6.11 by Sebastian Bergmann.

...etc...

 FAILURES!
Tests: 2,Assertions: 2,Failures: 1.

似乎PHPunit没有在PHPstorm中执行?不应该有某种错误信息而不是退出代码0?
PHP&的路径在PHPstorms配置中的PHPunit(相同)应该没问题(都通过homebrew安装在/usr/local/bin中,路径添加PHPstorm)

osx 10.7.4
PHP 5.3.14
PHPUnit 3.6.11

谢谢你的帮助!
马蒂亚斯

解决方法

在Mac OS X上,终端中可用的环境变量和正常应用程序可以不同,check the related question对于解决方案如何使它们相似.

注意这个解决方will not work on Mountain Lion(10.8).

猜你在找的Phpstorm相关文章