feat(wpmc S3): Plugin::boot() wires ShortcodeDmr
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?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'
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user