Files
wc-composable-product/tests/stubs/class-wc-order.php
magdev a7d6a57f01
Some checks failed
Create Release Package / PHP Lint (push) Successful in 47s
Create Release Package / test (push) Failing after 53s
Create Release Package / build-release (push) Has been skipped
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>
2026-03-01 13:08:22 +01:00

25 lines
481 B
PHP

<?php
/**
* Minimal WC_Order stub for unit testing.
*/
class WC_Order extends WC_Data {
protected $items = [];
protected $order_notes = [];
public function get_items($type = '') {
return $this->items;
}
public function set_items($items) {
$this->items = $items;
}
public function add_order_note($note) {
$this->order_notes[] = $note;
}
public function get_order_notes() {
return $this->order_notes;
}
}