php7 环境下安装 phpunit6

最新的PHPUnit 6.0 需要php5.6以上的版本,PHPUnit 需要的DOM和JSON是默认启动的,一般不需要单独安装。

PHPUnit 还需要 :

pcre [http://php.net/manual/en/pcre.installation.php]、

reflection [http://php.net/manual/en/reflection.installation.php]、spl[http://php.net/manual/en/spl.installation.php] 扩展。这些标准扩展默认启用,并且除非修改 PHP 的构建系统和 C 源代码,否则无法禁用它们。

代码覆盖率分析报告功能需要 Xdebug [http://xdebug.org/] (2.2.1以上)与 tokenizer [http://php.net/manual/en/tokenizer.installation.php] 扩展。生成 XML 格式的报告需要有 xmlwriter[http://php.net/manual/en/xmlwriter.installation.php] 扩展。

下面是安装步骤:

$ wget https://phar.phpunit.de/phpunit.phar

$ chmod +x phpunit.phar

$ sudo mv phpunit.phar /usr/local/bin/phpunit

$ phpunit --version

参照来源:

github:https://github.com/sebastianbergmann/phpunit

phpunitbook:http://www.phpunit.cn/manual/current/zh_cn/phpunit-book.pdf

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Chapter 1. Installing PHPUnit Requirements PHPUnit 5.7 re...
    手表大大阅读 549评论 0 0
  • Composer Repositories Composer源 Firegento - Magento模块Comp...
    零一间阅读 3,967评论 1 66
  • 更改ip和dnsVi /etc/sysconfig/network-scripts/ifcfg-eth0vi /...
    Xwei_阅读 1,854评论 0 3
  • 2015.12.3 发生了两件大事, PHP7 问世了, Swift 开源了。最好的语言发布了新的版本,一个划时代...
    搬砖家阅读 561评论 0 1
  • 1.LAMP介绍  LAM(M)P:L: linuxA: apache (httpd)M: mysql, mar...
    尛尛大尹阅读 1,079评论 0 1