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
+3
View File
@@ -14,6 +14,9 @@ abstract class TestCase extends BaseTestCase
{
parent::setUp();
Monkey\setUp();
// Load ACF stubs through Patchwork's stream wrapper (AFTER setUp activates it)
// so the functions can be redefined across test classes in the same process.
require_once __DIR__ . '/acf-stubs.php';
Monkey\Functions\stubTranslationFunctions();
Monkey\Functions\when('shortcode_atts')->alias(function (array $defaults, array $atts): array {
return array_merge($defaults, array_intersect_key($atts, $defaults));