PHPStorm 10 配置PHPUnit

PHPStorm 10 配置PHPUnit

PHPUnit的安装

自己用的是Xampp,PHPUnit好像自带不好用。
不说废话:
自己看
According to official site
https://phpunit.de/

PHPUnit 5.2 is supported on PHP 5.6 and PHP 7.
PHPUnit 4.8 is supported on PHP 5.3, PHP 5.4, PHP 5.5, and PHP 5.6.

自己下载,简单粗暴。不需要用PEAR
I like to download it manually rather than by a program or command(via pear).

or you can download phpunit.phar from
https://phar.phpunit.de/
for Windows:
echo @php “%~dp0phpunit.phar” %* > phpunit.cmd
in your Xampp/php directory
read more about it:
http://www.phpunit.cn/getting-started.html
if you’re using Linux.

设置PhpStorm选项

File -> Settings -> Languages and Frameworks -> PHP -> PHPUnit
choose path to phpunit.phar then add
J:\xampp\php\phpunit.phar

为PHPStorm提供phpUnit代码自动完成

code completion for phpstorm using phpstorm

File -> Settings -> Languages and Frameworks -> PHP
添加include path:
你可以把phpunit.phar扔进去:
J:\xampp\php\phpunit-storm
然后你的PHPstorm代码测试里面 PHPUnit_Framework_TestCase 就不会报错找不到之类的。

Composer配置

懒得写,跟这个差不多

超级好的站点:
http://www.phpcomposer.com/
http://pkg.phpcomposer.com/
http://pkg.phpcomposer.com/#composer-mirror
<<<<<<<安装说明

再继续研究,转行做专业测试算了,用PHPUnit的很少啊。。上github搜phpunit.xml有例子。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值