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>
Also fixes PluginBootTest to be order-independent (reset booted flag)
and to expect ShortcodeDmr hook that boot() now wires.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements alt_get_field(): applies wpmc_alt_get_field_post_id filter for
post_id remapping, guards against missing ACF, runs do_shortcode on string
results, passes arrays/null through unchanged. 4 new tests; full suite
22 tests / 58 assertions green.
Note: Brain Monkey FunctionStub::__construct calls function_exists()
internally; expect() calls must precede when('function_exists')->alias()
in each test to avoid the alias intercepting the stub-creation check and
causing eval redeclaration errors.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wrap 4 define() calls with defined() || guards to survive double-load.
Replace hardcoded 'shortcode-town' strings in Taxonomy and FieldGroup
with PostType::SLUG. Update Activator comment to reflect S2 reality.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add private \$booted flag; guard skips all re-registration on subsequent
calls. TDD: RED (3x boot -> expectAdded->once() fails) then GREEN.
Drop deprecated setAccessible() call (no-op since PHP 8.1).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Also stub translation functions in base TestCase so __() calls from
WPMultiCity namespace resolve correctly via Brain Monkey.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>