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:
@@ -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 {}
|
||||
}
|
||||
Reference in New Issue
Block a user