Cviebrock\EloquentSluggable\Tests\TestCase::withoutEvents PHP Method

withoutEvents() protected method

Mock the event dispatcher so all events are silenced and collected.
protected withoutEvents ( )
    protected function withoutEvents()
    {
        $mock = Mockery::mock('Illuminate\\Contracts\\Events\\Dispatcher');
        $mock->shouldReceive('fire', 'until');
        $this->app->instance('events', $mock);
        return $this;
    }