feat(wpmc S3): procedural wpmc_* API + smoke test

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>
This commit is contained in:
Vladimir Bryzgalov
2026-05-12 20:11:47 +05:00
parent 3dbca34234
commit d8b0d01f1c
4 changed files with 60 additions and 1 deletions
+13
View File
@@ -197,4 +197,17 @@ final class HelpersTest extends TestCase
self::assertSame('mailto:x@y.com', Helpers::remove_domain_link('mailto:x@y.com'));
self::assertSame('not a url', Helpers::remove_domain_link('not a url'));
}
public function test_wpmc_procedural_functions_proxy_to_helpers(): void
{
require_once dirname(__DIR__) . '/includes/wpmc-functions.php';
self::assertTrue(function_exists('wpmc_current_town'));
self::assertTrue(function_exists('wpmc_get_term_by_slug'));
self::assertTrue(function_exists('wpmc_alt_get_field'));
self::assertTrue(function_exists('wpmc_remove_domain_link'));
// remove_domain_link is pure (no WP function dependencies) — exercise the proxy.
self::assertSame('/foo/', wpmc_remove_domain_link('https://site.com/foo/'));
}
}