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
基础教程推荐
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 在多维数组中查找最大值 2021-01-01