Home > Backend Development > PHP Tutorial > phpunit安装有关问题

phpunit安装有关问题

WBOY
Release: 2016-06-13 10:40:45
Original
970 people have browsed it

phpunit安装问题
今天试了一下安装phpunit 结果发现问题不少,我得方法是用pear安装的.
先安装pear php根目录
执行

php go-pear.php
Copy after login

一路回车,碰见(y/n)就选择y
最后会生成一个PEAR_ENV.reg的注册表文件,双击之,将信息导入注册表就可以使用pear了

我安装phpunit 失败几次主要问题还是pear 版本太低,建议先看看pear版本是否太旧,建议升级到1.9以上。
查看版本
 pear -V
Copy after login

升级
pear install --force PEAR-1.9.4
Copy after login

更新
 pear upgrade-all --force 
Copy after login

--force == 强制

加入频道
pear channel-discover pear.phpunit.de
Copy after login

安装
pear install --alldeps phpunit/PHPUnit
Copy after login


问题:
安装时内存可能不够用
memory_limit = 20M 改一下升级完改回来就行。
关键还是要pear升级,确定关键依赖都安装了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template