Model::withoutEvents() behavior in tests — do events always restore after the closure? #56300
Unanswered
shakin-shahria
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I've been exploring the behavior of
Model::withoutEvents()
in Laravel tests. According to the documentation, events should be disabled only within the closure passed towithoutEvents()
, and then restored afterward.I wrote a simple test to verify this:
Beta Was this translation helpful? Give feedback.
All reactions