diff --git a/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php b/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php index bfca60f97c5d..7fc360e76f75 100644 --- a/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php +++ b/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php @@ -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 @@ -102,6 +103,8 @@ protected function withoutEvents() $this->firedEvents[] = $called; }); + Event::clearResolvedInstances(); + $this->app->instance('events', $mock); return $this;