linux下安装phpunit简单方法
2014-10-15 14:09
411 查看
现在安装phpunit相当简单,只需要下载phar压缩格式的phpunit文件,给个执行权限,就可以执行了
以下是一段官方安装文档
个人感觉如果不想把phpunit.phar直接放进/usr/local/bin目录下也是可以的
可以执行如下命令,建个符号链接再给个执行的权限就可以了:
如果能显示正确的版本号,就表示安装相当成功.
不过目前的Yii框架好像对这种phar格式的phpunit不太支持.
只能下载旧版本的phpunit
官网链接:http://pear.phpunit.de/
下载了几个合并了一下,链接地址:http://pan.baidu.com/s/1i3Jyrel
然后,解压到指定文件夹
同时设置php.ini的include_path
这样就可以调用了!
以下是一段官方安装文档
wget https://phar.phpunit.de/phpunit.phar chmod +x phpunit.phar sudo mv phpunit.phar /usr/local/bin/phpunit phpunit --version PHPUnit 4.2.0 by Sebastian Bergmann.
个人感觉如果不想把phpunit.phar直接放进/usr/local/bin目录下也是可以的
可以执行如下命令,建个符号链接再给个执行的权限就可以了:
ln -s /root/phpunit.phar /usr/local/sbin/phpunit chmod u+x /usr/local/sbin/phpunit
phpunit --version PHPUnit 4.2.0 by Sebastian Bergmann.
如果能显示正确的版本号,就表示安装相当成功.
不过目前的Yii框架好像对这种phar格式的phpunit不太支持.
只能下载旧版本的phpunit
官网链接:http://pear.phpunit.de/
下载了几个合并了一下,链接地址:http://pan.baidu.com/s/1i3Jyrel
然后,解压到指定文件夹
/path-to-php/PHPUnit-3.7.35 /path-to-php/PHPUnit-3.7.35/phpunit.php /usr/local/sbin/phpunit chmod u+x phpunit
同时设置php.ini的include_path
include_path = ".:/path-to-php/PHPUnit-3.7.35"
这样就可以调用了!
相关文章推荐
- 用U盘安装Linux系统的简单方法
- Linux 批量安装 软件包的简单方法
- linux 下安装 LNMP 最简单的安装方法
- linux下安装mysql简单的方法
- linux上面安装mongodb的最简单的方法
- 阿里云linux服务器下安装Apache的简单方法
- Linux 安装 oh my zsh 终端及简单使用方法
- Linux(CentOS 6.8)系统安装Nginx的方法,简单易用!
- 用U盘安装Linux系统的简单方法
- 在硬盘中安装Linux操作系统最简单的方法
- Linux下安装wine虚拟机,安装方法相当简单
- 用U盘安装Linux系统的简单方法
- 用U盘安装Linux系统的简单方法
- linux下安装svn简单方法
- 阿里云linux服务器下安装Apache的简单方法
- linux下最简单的方法安装 Mysql-python
- linux下安装mysql简单的方法
- Linux下刚安装完mysql修改密码的简单方法