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 中加载,如图
立即学习“PHP免费学习笔记(深入)”;
第二个就是phpunit.phar的路径
3.。加载phpunit安装目录:
4.。选择编译器
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怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号