You've already forked wc-composable-product
Add PHPUnit test suite, PSR-4 refactor, lint+test CI jobs (v1.3.1)
- 57 unit tests covering ProductType, StockManager, CartHandler, Plugin, Admin/ProductData, Admin/Settings using Brain Monkey + Mockery - WooCommerce class stubs for testing without WP installation - PHP lint and test jobs in release workflow (test gate blocks release) - PSR-4 namespace change: WC_Composable_Product -> Magdev\WcComposableProduct - PascalCase filenames for all classes under includes/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
13
README.md
13
README.md
@@ -12,7 +12,8 @@ Create composable products where customers can select a limited number of items
|
||||
- **Pricing Options**: Fixed price or sum of selected products with full locale-aware formatting
|
||||
- **Multi-language Support**: Fully translated in 6 locales (de_DE, de_CH, fr_CH, it_CH + informal variants)
|
||||
- **Modern UI**: Clean interface built with Twig templates and vanilla JavaScript
|
||||
- **CI/CD**: Automated release workflow for Gitea
|
||||
- **Tested**: 57 unit tests with PHPUnit, Brain Monkey, and Mockery
|
||||
- **CI/CD**: Automated release workflow with test gate for Gitea
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -118,6 +119,16 @@ This project was created with AI assistance (Claude.AI) and follows WordPress an
|
||||
composer install
|
||||
```
|
||||
|
||||
### Running Tests
|
||||
|
||||
The plugin includes a PHPUnit test suite with Brain Monkey for WordPress function mocking:
|
||||
|
||||
```bash
|
||||
vendor/bin/phpunit --testdox
|
||||
```
|
||||
|
||||
Tests run without a WordPress installation. WooCommerce classes are provided as minimal stubs in `tests/stubs/`.
|
||||
|
||||
### Translation
|
||||
|
||||
Generate POT file:
|
||||
|
||||
Reference in New Issue
Block a user