phpstorm配置phpunit,进行php单元测试

来源:互联网 发布:西安软件新城二期工程 编辑:程序博客网 时间:2024/05/18 02:31

phpstorm配置phpunit,进行php接口单元测试

1。安装php5.6,phpunit5.1,curl

mac 自带的默认是php5.5,需要升级,打开终端,运行:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6

查看phpunit官网文档,根据文档步骤

wget https://phar.phpunit.de/phpunit.phar$ chmod +x phpunit.phar$ sudo mv phpunit.phar /usr/local/bin/phpunit$ phpunit --versionPHPUnit 5.1.3 by Sebastian Bergmann and contributors

2。下载phpunit.phar文件,然后在phpstorm 中加载,如图

这里写图片描述

第二个就是phpunit.phar的路径

3.。加载phpunit安装目录:

这里写图片描述

4.。选择编译器

这里写图片描述

5,根据curl 模拟访问接口,

0 0
原创粉丝点击