Files
wp-multi-city/tests/PluginBootShortcodeDmrTest.php
Vladimir Bryzgalov 3dbca34234 feat(wpmc S3): Plugin::boot() wires ShortcodeDmr
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 20:10:42 +05:00

29 lines
706 B
PHP

<?php
declare(strict_types=1);
namespace WPMultiCity\Tests;
use WPMultiCity\Plugin;
final class PluginBootShortcodeDmrTest extends TestCase
{
public function test_boot_attaches_shortcode_dmr_init_action(): void
{
if (!class_exists('ACF', false)) {
eval('class ACF {}');
}
$plugin = Plugin::instance();
$reflection = new \ReflectionClass($plugin);
$prop = $reflection->getProperty('booted');
$prop->setValue($plugin, false);
$plugin->boot();
self::assertNotFalse(
has_action('init', ['WPMultiCity\\ShortcodeDmr', 'do_register']),
'boot() must register ShortcodeDmr on init'
);
}
}