You've already forked wc-bootstrap
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>
15 lines
432 B
PHP
15 lines
432 B
PHP
<?php
|
|
/**
|
|
* PHPUnit bootstrap file.
|
|
*
|
|
* Loads Composer autoloader and class stubs required
|
|
* for unit testing outside of WordPress/WooCommerce.
|
|
*/
|
|
|
|
// Composer autoloader (loads WcBootstrap\* classes + Brain\Monkey).
|
|
require_once dirname(__DIR__) . '/vendor/autoload.php';
|
|
|
|
// Class stubs (WordPress / WooCommerce / parent theme).
|
|
require_once __DIR__ . '/Stubs/TwigService.php';
|
|
require_once __DIR__ . '/Stubs/WcProduct.php';
|