Files
wp-multi-city/tests/acf-stubs.php
T
Vladimir Bryzgalov 494061e39f 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>
2026-05-16 19:33:39 +05:00

19 lines
611 B
PHP

<?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 {}
}