File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/Codeception/Module/Symfony Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ public function dontSeeEvent(array|string|null $expected = null): void
47
47
* $I->dontSeeEventListenerIsCalled('App\MyEventListener', ['my.event', 'my.other.event']);
48
48
* ```
49
49
*
50
- * @param class-string|object|list<class-string|object> $expected Listener(s) (class-string or instance) that must **not** be called .
51
- * @param string|list<string> $events Event name(s) to scope the assertion to; empty array means “ any event” .
50
+ * @param class-string|object|list<class-string|object> $expected Listeners (class-strings or object instances) .
51
+ * @param string|list<string> $events Event name(s) ( empty = any) .
52
52
*/
53
53
public function dontSeeEventListenerIsCalled (array |object |string $ expected , array |string $ events = []): void
54
54
{
@@ -193,11 +193,10 @@ protected function getDispatchedEvents(): array
193
193
protected function getOrphanedEvents (): array
194
194
{
195
195
$ eventCollector = $ this ->grabEventCollector (__FUNCTION__ );
196
- $ orphaned = $ eventCollector ->getOrphanedEvents ($ this ->getDefaultDispatcher ());
197
- $ raw = $ orphaned instanceof Data ? $ orphaned ->getValue (true ) : $ orphaned ;
196
+ $ orphanedEvents = $ eventCollector ->getOrphanedEvents ($ this ->getDefaultDispatcher ());
198
197
199
198
/** @var list<string> $events */
200
- $ events = is_array ($ raw ) ? array_values ($ raw ) : [] ;
199
+ $ events = is_array ($ orphanedEvents ) ? array_values ($ orphanedEvents ) : $ orphanedEvents -> getValue ( true ) ;
201
200
return $ events ;
202
201
}
203
202
You can’t perform that action at this time.
0 commit comments