安装 phpunit 和示例
我正在尝试学习 PHPUnit。我使用 MacOS X,并且刚刚使用 PEAR 安装了 PHPUnit,方法如下:
pear channel-discover pear.phpunit.de
pear install phpunit/PHPUnit
安装后,它位于 pear/share/pear/PHPUnit
中。它有 Extensions
和 Framework
文件夹。
我尝试从 Pear PHPUnit 教程 创建示例,但在示例中它说它需要 PHPUnit.php,但我没有看到该文件。我需要安装其他东西才能使其正常工作吗?
另外,示例脚本应该放在哪里?
任何人都可以指导我设置此 PHPunit 测试并通过一个示例进行尝试吗?谢谢。
I am trying to learn PHPUnit. I use MacOS X and just installed PHPUnit using PEAR by doing this:
pear channel-discover pear.phpunit.de
pear install phpunit/PHPUnit
After installation, it's located in pear/share/pear/PHPUnit
. It has Extensions
and Framework
folders.
I tried creating the examples from the Pear PHPUnit tutorial, but in the example it says it requires PHPUnit.php
and I don't see that file. Do I need to install anything else to make this work?
Also, where should the example scripts be placed?
Can anyone please guide me in setting up this PHPunit test and try it with one example? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
位于 pear.phpunit.de 频道的文档已经完全过时了。请不要再使用它们。 引用 PHPUnit 的作者 Sebastian Bergmann:
官方文档位于:
要安装 PHPUnit,请按照 phpunit 官方网站上的说明进行操作:
例如执行
然后
The docs located at the pear.phpunit.de channel are completely out of date. Please do not use them anymore. Quoting Sebastian Bergmann, author of PHPUnit:
The official docs are located at:
To install PHPUnit, follow the instructions at the official phpunit website instead:
e.g. do
and then