test(wpmc S4): restore ACF-missing guard assertions + tighten stub signature
Re-add ->never() to both noop tests so Brain Monkey/Mockery actively asserts
acf_add_local_field_group is never called when ACF is absent. Order matters:
expect() must precede when('function_exists')->alias() so FunctionStub sees the
real function_exists and skips the eval() path (function already declared in
acf-stubs.php). Also tighten stub signature to match real ACF ($field_group,
no type hint, no default).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -14,5 +14,5 @@ declare(strict_types=1);
|
||||
*/
|
||||
|
||||
if (!function_exists('acf_add_local_field_group')) {
|
||||
function acf_add_local_field_group(array $args = []): void {}
|
||||
function acf_add_local_field_group($field_group): void {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user