我创建了一个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.
似乎在phpstorm中没有执行phpunit? 它应该会显示某种错误消息,而不是以退出代码0完成吧? 在phpstorms配置中,php和phpunit的路径(相同)应该没问题(都通过homebrew安装在/usr/local/bin中,并将路径添加到phpstorm)。
OSX 10.7.4 PHP 5.3.14 PHPUnit 3.6.11
感谢您的帮助! Matthias
php
和访问测试中使用的文件的权限。 - CrazyCoder