diff --git a/src/Codeception/Module/Symfony/EventsAssertionsTrait.php b/src/Codeception/Module/Symfony/EventsAssertionsTrait.php index f2b0b63e..afcd7cd8 100644 --- a/src/Codeception/Module/Symfony/EventsAssertionsTrait.php +++ b/src/Codeception/Module/Symfony/EventsAssertionsTrait.php @@ -154,8 +154,9 @@ protected function eventWasTriggered(array $actual, string $expectedEvent): bool foreach ($actual as $actualEvent) { if (is_array($actualEvent)) { // Called Listeners - if (strpos($actualEvent['pretty'], $expectedEvent) === 0) { + if (strpos($actualEvent['event'], $expectedEvent) === 0) { $triggered = true; + break; } } else { // Orphan Events if ($actualEvent === $expectedEvent) { @@ -170,4 +171,4 @@ protected function grabEventCollector(string $function): EventDataCollector { return $this->grabCollector('events', $function); } -} \ No newline at end of file +}