File tree Expand file tree Collapse file tree
src/Illuminate/Support/Testing/Fakes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,8 +63,6 @@ public function dispatched($event, $callback = null)
6363
6464 return collect ($ this ->events [$ event ])->filter (function ($ arguments ) use ($ callback ) {
6565 return $ callback (...$ arguments );
66- })->flatMap (function ($ arguments ) {
67- return $ this ->mapEventArguments ($ arguments );
6866 });
6967 }
7068
@@ -79,24 +77,6 @@ public function hasDispatched($event)
7977 return isset ($ this ->events [$ event ]) && ! empty ($ this ->events [$ event ]);
8078 }
8179
82- /**
83- * Map the "fire" method arguments for inspection.
84- *
85- * @param array $arguments
86- * @return array
87- */
88- protected function mapEventArguments ($ arguments )
89- {
90- // If the fired event was just a simple string event, we will return the event
91- // name as the key with the array of arguments as the value. Otherwise this
92- // event was an object event and we will return this object as the value.
93- if (is_string ($ arguments [0 ])) {
94- return [$ arguments [0 ] => $ arguments [1 ]];
95- } else {
96- return [get_class ($ arguments [0 ]) => $ arguments [0 ]];
97- }
98- }
99-
10080 /**
10181 * Register an event listener with the dispatcher.
10282 *
You can’t perform that action at this time.
0 commit comments