This was discussed in https://github.com/laravel/framework/issues/1181 but that is no longer there now :(.
My solution involved using:
Model::flushEventListeners(); Model::boot();
before each test. If you are only flushing the listeners I would expect it to not work.
How you do this is up to you. I just ended up putting it in __before() but I havent needed to copy that into very many tests yet.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community