test,ci: 建立 phpunit 基建 + 移植 WC 測試 + CI workflow
- composer.json / phpunit.xml / tests/bootstrap.php(比照 HP AddOn, 直接 require 核心 plugin 的 unit bootstrap) - tests/unit/WooCommerceIntegrationTest.php(自 A 移植,10 tests) - .gitea/workflows/test.yml:lint + unit(unit job 會一併 checkout 核心 plugin, 因為測試 bootstrap 依賴它) 10 tests / 33 assertions GREEN Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
This commit is contained in:
+10
-4
@@ -1,18 +1,24 @@
|
||||
{
|
||||
"name": "2meet/2meet-data-optimizer-woocommerce-addon",
|
||||
"description": "WooCommerce 整合:20 表 schema 註冊 + commission tracking + product/order zone + HPOS notice",
|
||||
"description": "WooCommerce integration layer for 2meet Data Optimizer",
|
||||
"type": "wordpress-plugin",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"keywords": ["wordpress", "2meet-data-optimizer", "addon", "woocommerce"],
|
||||
"require": {
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"brain/monkey": "^2.6",
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^1.2",
|
||||
"phpcompatibility/phpcompatibility-wp": "^2.1",
|
||||
"phpcsstandards/phpcsutils": "^1.2",
|
||||
"phpunit/phpunit": "^10.5",
|
||||
"wp-coding-standards/wpcs": "^3.0"
|
||||
"squizlabs/php_codesniffer": "^3.13",
|
||||
"wp-coding-standards/wpcs": "^3.0",
|
||||
"yoast/phpunit-polyfills": "^2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"phpcs": "phpcs --standard=WordPress includes/ 2meet-data-optimizer-woocommerce-addon.php"
|
||||
"test": "phpunit --configuration phpunit.xml",
|
||||
"phpcs": "phpcs --standard=WordPress includes/ admin/ cli/"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
|
||||
Reference in New Issue
Block a user