Closed bytestream closed 4 years ago
Comparison of:
withoutEvents() diff:
withoutEvents()
$mock = Mockery::mock('Illuminate\Contracts\Events\Dispatcher'); $mock->shouldReceive('fire', 'dispatch', 'getCommandHandler')->andReturnUsing(function ($called) { $this->firedEvents[] = $called; }); $this->app->instance('events', $mock); return $this;
$mock = Mockery::mock(EventsDispatcherContract::class)->shouldIgnoreMissing(); $mock->shouldReceive('dispatch', 'until')->andReturnUsing(function ($called) { $this->firedEvents[] = $called; }); Event::clearResolvedInstances(); $this->app->instance('events', $mock); return $this;
I noticed this having tried to use expectsEvents() and ran into a mockery error stating until was called but had not been mocked.
expectsEvents()
until
There are other differences https://www.diffchecker.com/HRM1BixO
Please resubmit this with a filled out issue template.
Comparison of:
withoutEvents()
diff:I noticed this having tried to use
expectsEvents()
and ran into a mockery error statinguntil
was called but had not been mocked.There are other differences https://www.diffchecker.com/HRM1BixO