Skip to content

Commit 2ccbdd1

Browse files
MTC-10446 Add debugging for ci workflow
1 parent 9b49ee7 commit 2ccbdd1

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Tests/Functional/EventListener/DynamicContentSubscriberFunctionalTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)