Skip to content

Commit

Permalink
clear resolved event facade on withoutEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed May 7, 2020
1 parent c2e3c45 commit d1e7f85
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContract;
use Illuminate\Contracts\Events\Dispatcher as EventsDispatcherContract;
use Illuminate\Contracts\Notifications\Dispatcher as NotificationDispatcher;
use Illuminate\Support\Facades\Event;
use Mockery;

trait MocksApplicationServices
Expand Down Expand Up @@ -102,6 +103,8 @@ protected function withoutEvents()
$this->firedEvents[] = $called;
});

Event::clearResolvedInstances();

$this->app->instance('events', $mock);

return $this;
Expand Down

0 comments on commit d1e7f85

Please sign in to comment.