3dbca34234
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
706 B
PHP
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'
|
|
);
|
|
}
|
|
}
|