Logo
Explore Help
Sign In
magdev/wc-bootstrap
1
Fork 0
You've already forked wc-bootstrap
Code Issues Pull Requests Actions Releases 8 Activity
Files
5e4af247fa4206250933aa1e0fe8a1c3429d875a
wc-bootstrap/tests/Stubs/WcProduct.php

22 lines
308 B
PHP
Raw Normal View History

Add PHPUnit test suite with Brain\Monkey (v0.1.6) Add test infrastructure for isolated unit testing without WordPress/WooCommerce: - 27 tests (54 assertions) covering TemplateOverride and WooCommerceExtension - Brain\Monkey for WordPress function mocking, class stubs for TwigService and WC_Product - PHPUnit test job added to Gitea CI pipeline between lint and build-release - Test artifacts excluded from release packages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 03:48:19 +01:00
<?php
/**
* Stub for WC_Product.
*
* Minimal implementation for type-hint satisfaction in unit tests.
*/
class WC_Product
{
private int $id;
public function __construct(int $id = 0)
{
$this->id = $id;
}
public function get_id(): int
{
return $this->id;
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 144ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API