feat(wpmc S4): TermMeta registers ACF main_page_alt on taxonomy town

Add acf-stubs.php + TestCase::setUp() require-after-Patchwork pattern so
acf_add_local_field_group is Patchwork-instrumented and re-interceptable
across FieldGroupTest and TermMetaTest in the same PHP process.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vladimir Bryzgalov
2026-05-16 19:33:39 +05:00
parent b967a3a59f
commit 494061e39f
5 changed files with 132 additions and 5 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
/**
* Minimal ACF function stubs for the test suite.
*
* This file is required from TestCase::setUp() AFTER Brain\Monkey\setUp() so
* that Patchwork's stream wrapper instruments these functions and can redefine
* them across successive test classes in the same PHP process.
*
* Functions declared via eval() cannot be re-intercepted by Patchwork after
* restoreAll(); functions from a real file loaded through Patchwork's stream
* wrapper can.
*/
if (!function_exists('acf_add_local_field_group')) {
function acf_add_local_field_group(array $args = []): void {}
}