PEAR 安装后 PHPUnit CLI 不可用
我已经使用以下命令在我的 OS X Snow Leopard 机器上安装了 PHPUnit:
sudo pear channel-discover pear.phpunit.de
sudo pear install phpunit/PHPUnit
我希望 phpunitCLI 命令在此之后可用,但事实并非如此。我查看了 /usr/local/bin
和 /usr/lib/php/PHPUnit
但找不到任何看起来像 CLI 的东西。
谁能告诉我如何启动并运行 CLI?
I've installed PHPUnit on my OS X Snow Leopard box using the following command:
sudo pear channel-discover pear.phpunit.de
sudo pear install phpunit/PHPUnit
I would expect that the phpunit
CLI command would be available after that, but it isn't. I've looked in /usr/local/bin
and /usr/lib/php/PHPUnit
but can't find anything that looks like a CLI.
Can anyone tell me how to get the CLI up and running?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我遇到了同样的问题,在 pear 安装后没有收到任何错误,但安装了一些目录和文件(在 /usr/lib/php/pear 下),而其他文件丢失了(我没有 phpunit.sh 文件等)。
我的设置:OSX Lion 10.7.2 + PHP 5.3.6 + PEAR 1.9.2。
我不能确定问题是什么,但我发现 PEAR 安装程序不是最新的,所以我将其升级(到 1.9.4):
之后,按照 phpunit 手册,我输入:
所以您不需要为每个包和依赖项添加通道。然后:
瞧,一切终于正常了!
I had the same problem, I received no errors after the pear installation, but some directories and files where installed (under /usr/lib/php/pear) and others missing (I had no phpunit.sh file among others).
My setup: OSX Lion 10.7.2 + PHP 5.3.6 + PEAR 1.9.2.
I can't really say for sure what the problem was, but I found that the PEAR installer was not up to date, so I upgraded it (to 1.9.4) with:
After that, following the phpunit manual, I typed:
So yo don't need to add the channels for every package and dependency. And then:
And voilà, everything is working finally!
我遇到了同样的问题,在检查 安装 页面并运行以下命令后,它开始工作了。只需确保在运行它们之前将其删除即可。
I had the same problem, after checking installation page and running below commands, it started working. Just make sure to remove it before running them.
发现频道后不要忘记清除缓存:
我无法使用 PEAR 安装任何东西,清除缓存对我有用
Do not forget to clear the cache after discovering the channels:
I couldn't install anything with PEAR and clearing the cache worked for me