Skip to content

[5.4] Implement until method on the EventFake#19062

Merged
taylorotwell merged 1 commit into
laravel:5.4from
sebdesign:event-fake-until
May 5, 2017
Merged

[5.4] Implement until method on the EventFake#19062
taylorotwell merged 1 commit into
laravel:5.4from
sebdesign:event-fake-until

Conversation

@sebdesign

Copy link
Copy Markdown
Contributor

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.

This is useful for testing model halting events like saving, creating, updating, deleting.

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 laravel#18923
@tillkruss tillkruss changed the title Implement until method on the EventFake [5.4] Implement until method on the EventFake May 5, 2017
@taylorotwell taylorotwell merged commit b9aae31 into laravel:5.4 May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants