下面由phpstorm教程欄目給大家介紹phpstorm-laravel-phpunit,希望對需要的朋友有所幫助!
一,新建composer.json文件
{ "require": { "yzalis/identicon": "^1.1", "phpunit/phpunit": "5.5.*" } }
二,運行composer install,得到如下目錄結構
三,復制yzalis/phpuit.xml.dist到項目的根目錄下,并重命名為phpunit.xml
四,配置phpstorm的php環境
五,配置PHPUnit環境
六,新建RunTest.php文件
<?php namespace demo1; use IdenticonIdenticon; use PHPUnitFrameworkTestCase; class RunTest extends TestCase{ public function testDemo(){ $identicon = new Identicon(); $img = $identicon->getImageData('bar',512); file_put_contents('./a.png',$img); } }
七,執行
立即學習“PHP免費學習筆記(深入)”;
八,輸出
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦