chore(wpmc S2): pin patchwork cache + tighten noop test guard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,12 +19,18 @@ final class FieldGroupTest extends TestCase
|
||||
|
||||
public function test_do_register_is_noop_when_acf_missing(): void
|
||||
{
|
||||
\Brain\Monkey\Functions\when('function_exists')->justReturn(false);
|
||||
\Brain\Monkey\Functions\when('function_exists')->alias(function ($name) {
|
||||
return $name !== 'acf_add_local_field_group';
|
||||
});
|
||||
\Brain\Monkey\Functions\expect('acf_add_local_field_group')->never();
|
||||
|
||||
FieldGroup::do_register();
|
||||
|
||||
self::assertTrue(true, 'do_register must not call acf_add_local_field_group when ACF is missing');
|
||||
// The real check is the ->never() Mockery expectation above (verified at
|
||||
// teardown). assertTrue is here only to keep PHPUnit from flagging the
|
||||
// test as risky under failOnRisky="true" — Mockery assertions don't
|
||||
// count toward PHPUnit's assertion tally.
|
||||
self::assertTrue(true);
|
||||
}
|
||||
|
||||
public function test_do_register_calls_acf_add_local_field_group_with_expected_structure(): void
|
||||
|
||||
Reference in New Issue
Block a user