You've already forked wp-bootstrap
PHPUnit 11 + Brain\Monkey for WordPress function mocking. Tests cover BlockRenderer (28), WidgetRenderer (9), NavWalker (14), and TemplateController (12). Includes functional WP_HTML_Tag_Processor stub, CI test job between lint and build-release, prebuild hook gating npm build on passing tests, and release package exclusions for test files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
16 lines
469 B
PHP
16 lines
469 B
PHP
<?php
|
|
/**
|
|
* PHPUnit bootstrap file.
|
|
*
|
|
* Loads Composer autoloader and WordPress class stubs
|
|
* required for unit testing outside of WordPress.
|
|
*/
|
|
|
|
// Composer autoloader (loads WPBootstrap\* classes + Brain\Monkey).
|
|
require_once dirname(__DIR__) . '/vendor/autoload.php';
|
|
|
|
// WordPress class stubs (global namespace).
|
|
require_once __DIR__ . '/Stubs/WpHtmlTagProcessor.php';
|
|
require_once __DIR__ . '/Stubs/WpBlock.php';
|
|
require_once __DIR__ . '/Stubs/WpWidget.php';
|