original_string: public static function fakeFor(callable $callable, array $eventsToFake = [])
      {
          $originalDispatcher = static::getFacadeRoot();
  
          static::fake($eventsToFake);
  
          return tap($callable(), function () use ($originalDispatcher) {
              static::swap($originalDispatcher);
  
              Model::setEventDispatcher($originalDispatcher);
          });
      }
code: public static function fakeFor(callable $callable, array $eventsToFake = [])
      {
          $originalDispatcher = static::getFacadeRoot();
  
          static::fake($eventsToFake);
  
          return tap($callable(), function () use ($originalDispatcher) {
              static::swap($originalDispatcher);
  
              Model::setEventDispatcher($originalDispatcher);
          });
      }
code_tokens: public static function fakeFor ( callable $ callable , array $ eventsToFake = [ ] ) { $ originalDispatcher = static :: getFacadeRoot ( ) ; static :: fake ( $ eventsToFake ) ; return tap ( $ callable ( ) , function ( ) use ( $ originalDispatcher ) { static :: swap ( $ originalDispatcher ) ; Model :: setEventDispatcher ( $ originalDispatcher ) ; } ) ; }
docstring: Replace the bound instance with a fake during the given callable's execution.
  
  @param  callable  $callable
  @param  array  $eventsToFake
  @return callable
docstring_tokens: Replace the bound instance with a fake during the given callable s execution .