phpstrom怎麼配置webman單元測試
下面由phpstorm教學欄位來介紹phpstrom docker phpunit 設定webman單元測試 ,希望對需要的朋友有幫助!
1、專案結構
#2 、Cli Interpreter 設定
這裡的注意點就是映射目錄的配置,是一個坑
## (1)Path mappings 目錄配置
#注意:Remote Path 是不需要配置的哦! 注意:Remote Path 是不需要設定的哦!
注意:Remote Path 是不需要設定的哦!
(2)Docker Container 目錄配置
注意:Container Path 是不需要設定的哦! 注意:Container Path 是不需要設定的哦!
注意:Container Path 是不需要設定的哦!
3、設定Test Framework
#(1)安裝phpunit 元件庫 #
composer require --dev phpunit/phpunit
登入後複製
(2)設定單元測試設定檔
##4、設定檔
(1)phpunit.xml:單元測試設定檔
<?xml version="1.0" encoding="UTF-8"?> <phpunit backupGlobals="false" backupStaticAttributes="false" bootstrap="tests/bootstrap.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" cacheResult="false"> <testsuites> <testsuite name="tests"> <directory suffix="Test.php">./tests</directory> </testsuite> </testsuites> </phpunit>
登入後複製
(3)tests/bootstrap.php 鷹架入口
<?php /** * @desc bootstrap.php 描述信息 * @author Tinywan(ShaoBo Wan) * @date 2021/11/9 18:00 */use Webman\Bootstrap;use Webman\Config;require_once __DIR__ . '/../vendor/autoload.php'; Config::load(config_path(), ['route', 'container']);if ($timezone = config('app.default_timezone')) { date_default_timezone_set($timezone); }foreach (config('autoload.files', []) as $file) { include_once $file; }foreach (config('bootstrap', []) as $class_name) { /** @var Bootstrap $class_name */ $class_name::start(null); }
登入後複製
5、開始偵錯.
以上是phpstrom怎麼配置webman單元測試的詳細內容。更多資訊請關注PHP中文網其他相關文章!
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章
R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
1 個月前
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
1 個月前
By 尊渡假赌尊渡假赌尊渡假赌
刺客信條陰影:貝殼謎語解決方案
2 週前
By DDD
R.E.P.O.如果您聽不到任何人,如何修復音頻
1 個月前
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.聊天命令以及如何使用它們
1 個月前
By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)
