phpstorm amp; phpunit(phpstormphpunit)
问题描述
我创建了一个 phpunit 测试文件,当我尝试通过 phpstorm 运行它时,我收到消息:
I created a phpunit test file , when I try to run it via phpstorm, I get the message:
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
当我通过命令行执行时,我得到更多的输出
when i execute this via command line , i get much more output
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)
seems phpunit isn't executed in phpstorm? shouldn't there be some sort of error message instead of finishing with exit code 0? Paths to php & phpunit (same) in phpstorms configuration should be ok (both installed via homebrew in /usr/local/bin, path added to phpstorm)
osx 10.7.4php 5.3.14PHPUnit 3.6.11
osx 10.7.4 php 5.3.14 PHPUnit 3.6.11
感谢您帮助我!
马蒂亚斯
Thanks for helping me!
Matthias
推荐答案
在 Mac OS X 上,终端和普通应用程序可用的环境变量可能不同,查看相关问题了解如何使它们相似的解决方案.
On Mac OS X environment variables available in Terminal and for the normal applications can be different, check the related question for the solution how to make them similar.
请注意,此解决方案不适用于 Mountain Lion (10.8).
Note that this solution will not work on Mountain Lion (10.8).
这篇关于phpstormphpunit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:phpstormphpunit


- Laravel 仓库 2022-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01