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>
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>
Add patchwork.json to enable function_exists shimming via Patchwork
(required so Brain Monkey can intercept the PHP internal).
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>