本身用的是Xampp,PHPUnit好像自帶很差用。
不說廢話:
本身看
According to official site
https://phpunit.de/php
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.html
本身下載,簡單粗暴。不須要用PEAR
I like to download it manually rather than by a program or command(via pear).git
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.github
File -> Settings -> Languages and Frameworks -> PHP -> PHPUnit
choose path to phpunit.phar then add
J:\xampp\php\phpunit.pharcomposer
File -> Settings -> Languages and Frameworks -> PHP
添加include path:
你能夠把phpunit.phar扔進去:
J:\xampp\php\phpunit-storm
而後你的PHPstorm代碼測試裏面 PHPUnit_Framework_TestCase 就不會報錯找不到之類的。phpstorm
懶得寫,跟這個差很少測試
超級好的站點:
http://www.phpcomposer.com/
http://pkg.phpcomposer.com/
http://pkg.phpcomposer.com/#composer-mirror
<<<<<<<安裝說明code
再繼續研究,轉行作專業測試算了,用PHPUnit的不多啊。。上github搜phpunit.xml有例子。orm