安装phpunit和例子 [英] installing phpunit and examples

查看:82
本文介绍了安装phpunit和例子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习PHPUnit.我使用MacOS X,并通过PEAR通过PEAR安装了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

安装后,它位于pear/share/pear/PHPUnit中.它具有ExtensionsFramework文件夹.

After installation, it's located in pear/share/pear/PHPUnit. It has Extensions and Framework folders.

我尝试从 Pear PHPUnit教程中创建示例

,但是在示例中它说它需要PHPUnit.php,但我看不到该文件.我是否需要安装其他东西才能使它正常工作?

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?

任何人都可以指导我设置此PHPunit测试并通过一个示例进行尝试吗?谢谢.

Can anyone please guide me in setting up this PHPunit test and try it with one example? Thanks.

推荐答案

位于pear.phpunit.de频道的文档已完全过时.请不要再使用它们. 引用塞巴斯蒂安·伯格曼,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:

谁负责PEAR手册:请删除 http://bit.ly/gU8eEG ,因为它会引起混淆人员(和搜索引擎).

Whoever is responsible for the PEAR Manual: please remove http://bit.ly/gU8eEG as it confuses people (and search engines).

官方文档位于:

要安装PHPUnit,请改用phpunit官方网站上的说明:

To install PHPUnit, follow the instructions at the official phpunit website instead:

例如做

pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com

然后

pear install --alldeps --force phpunit/PHPUnit

这篇关于安装phpunit和例子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆