'manual' );
aisthetix_tryon_activate();
boot_check( 'existing merchant settings survive reactivation', 'manual' === $GLOBALS['boot_options']['aisthetix_tryon_settings']['placement'] );
$GLOBALS['boot_transients']['aisthetix_tryon_status'] = array( 'stale' => true );
aisthetix_tryon_deactivate();
boot_check( 'deactivation clears only the status cache', ! isset( $GLOBALS['boot_transients']['aisthetix_tryon_status'] ) );
eval( 'class WooCommerce {}' );
aisthetix_tryon_bootstrap();
$plugin = Plugin::instance();
boot_check( 'singleton returns the same orchestrator', $plugin === Plugin::instance() );
boot_check( 'bootstrap wires every production component',
$plugin->status instanceof Status && $plugin->connect instanceof Connect && $plugin->settings instanceof Settings
&& $plugin->storefront instanceof Storefront && $plugin->blocks instanceof Blocks && $plugin->elementor instanceof Elementor
&& $plugin->attribution instanceof Attribution && $plugin->privacy instanceof Privacy
);
boot_check( 'component initialization registers the integration hooks', count( $GLOBALS['boot_actions'] ) >= 15 && count( $GLOBALS['boot_filters'] ) >= 10 );
$links = $plugin->plugin_action_links( array( 'Existing' ) );
boot_check( 'plugin action links put Settings first', false !== strpos( $links[0], 'aisthetix-tryon' ) && 2 === count( $links ) );
boot_check( 'brain URL and missing keys use safe defaults', 'https://woo.aisthetix.fyi' === Plugin::brain_url() && false === Plugin::is_connected() );
boot_check( 'missing settings return caller defaults', 'fallback' === Plugin::get_setting( 'missing', 'fallback' ) && false === Plugin::analytics_enabled() );
$plugin->blocks->register_block();
boot_check( 'dynamic block registers its server render callback', is_callable( $GLOBALS['boot_block'][1]['render_callback'] ) );
$placeholder = $plugin->blocks->render( array( 'label' => '' ) );
boot_check( 'REST editor receives a safe placeholder when storefront cannot render', false !== strpos( $placeholder, 'editor-placeholder' ) );
$manager = new class { public $registered = array(); public function register( $widget ) { $this->registered[] = $widget; } };
$plugin->elementor->register_widget( $manager );
boot_check( 'Elementor controller is inert until Elementor loads', array() === $manager->registered );
echo "\n{$passed} passed, {$failed} failed\n";
exit( $failed > 0 ? 1 : 0 );