无法找到PHPunit phar。检查php单位congifurations:eclipse氧气

时间:2018-04-26 07:26:51

标签: php html5 eclipse

1 [i'm running the code and getting the followed error] 2 当我去Run>运行方式> PHP单元测试,Eclipse抛出这个弹出窗口: Unable to find PHPUnit phar. Check PHPUnit configuration.

这个eclipse中的其他项目运行正常(给出输出),除了这个上传项目 我发现了类似的问题here,但我发现没有解决方法。 我尝试在eclipse中更改不同的设置但没有用。 我附加了属性树结构图像。 enter image description here enter image description here 帮我解决这个问题。 提前谢谢。

3 个答案:

答案 0 :(得分:1)

执行以下步骤。

项目 - >属性 - > PHP - >源路径 - >包含路径 - >图书馆  然后添加所需的库。 要么 检查This Link。它有效。

答案 1 :(得分:1)

我尝试了不同的设置更改,但没有任何帮助我。

我尝试在不同的平台上运行(运行为 - >运行在服务器/ php cli应用程序/ php web应用程序/ php单元测试中)。

这对我有用

最后我的项目工作正常:

以 - >运行PHP web Application

答案 2 :(得分:0)

Eclipse首选项 - > PHP - > PHPUnit,选择corect .phar。

phpunit.phar可以在运行/调试配置中覆盖。

对于作曲家项目,PDT使用来自供应商目录的phpunit(如果可用)。