Skip to content

Commit d1e7f85

Browse files
committed
clear resolved event facade on withoutEvents
1 parent c2e3c45 commit d1e7f85

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContract;
66
use Illuminate\Contracts\Events\Dispatcher as EventsDispatcherContract;
77
use Illuminate\Contracts\Notifications\Dispatcher as NotificationDispatcher;
8+
use Illuminate\Support\Facades\Event;
89
use Mockery;
910

1011
trait MocksApplicationServices
@@ -102,6 +103,8 @@ protected function withoutEvents()
102103
$this->firedEvents[] = $called;
103104
});
104105

106+
Event::clearResolvedInstances();
107+
105108
$this->app->instance('events', $mock);
106109

107110
return $this;

0 commit comments

Comments
 (0)