Skip to content

Commit

Permalink
Implement until method on the EventFake (#19062)
Browse files Browse the repository at this point in the history
When dispatching events using the `until` method instead of the
`dispatch` or `fire` methods, the given events were not being collected
in the `events` array of the `EventFake` class.

This was resulting false negatives, e.g. `assertDispatched` is failing
because the `until` method is not implemented like the `fire` and
`dispatch` methods.

* Fixes #18923
  • Loading branch information
sebdesign authored and taylorotwell committed May 5, 2017
1 parent 2059cae commit b9aae31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Testing/Fakes/EventFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,6 @@ public function forgetPushed()
*/
public function until($event, $payload = [])
{
//
return $this->dispatch($event, $payload, true);
}
}

0 comments on commit b9aae31

Please sign in to comment.