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

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 --version

PHPUnit 5.1.3 by Sebastian Bergmann and contributors

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

20160104133543_2316.png

第二个就是phpunit.phar的路径

20160104133543_3566.png

3.。加载phpunit安装目录:

20160104133543_6066.png

4.。选择编译器

20160104133543_9035.png

5,根据curl 模拟访问接口,').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('

').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了phpstorm配置phpunit,进行php单元测试,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值