File tree Expand file tree Collapse file tree
Tests/Functional/EventListener Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,20 @@ protected function setUp(): void
3434 // DEBUG: Check what Config service sees
3535 $ config = self ::getContainer ()->get (\MauticPlugin \LeuchtfeuerCompanySegmentsBundle \Integration \Config::class);
3636 error_log ('[SETUP-DEBUG] Config.isPublished(): ' . ($ config ->isPublished () ? 'YES ' : 'NO ' ));
37+
38+ // DEBUG: Check if subscriber is registered
39+ $ dispatcher = self ::getContainer ()->get ('event_dispatcher ' );
40+ $ hasListeners = $ dispatcher ->hasListeners (\Mautic \DynamicContentBundle \DynamicContentEvents::ON_CONTACTS_FILTER_EVALUATE );
41+ error_log ('[SETUP-DEBUG] EventDispatcher has DWC listeners: ' . ($ hasListeners ? 'YES ' : 'NO ' ));
42+
43+ if ($ hasListeners ) {
44+ $ listeners = $ dispatcher ->getListeners (\Mautic \DynamicContentBundle \DynamicContentEvents::ON_CONTACTS_FILTER_EVALUATE );
45+ error_log ('[SETUP-DEBUG] Number of listeners: ' . count ($ listeners ));
46+ foreach ($ listeners as $ listener ) {
47+ $ listenerClass = is_array ($ listener ) && is_object ($ listener [0 ]) ? get_class ($ listener [0 ]) : 'unknown ' ;
48+ error_log ('[SETUP-DEBUG] Listener: ' . $ listenerClass );
49+ }
50+ }
3751 }
3852
3953 public function testLeadSeesContentWhenPrimaryCompanyIsInSegment (): void
You can’t perform that action at this time.
0 commit comments