src/Concerns/MocksApplicationServices.php
public function withoutObservers($observers)
    {
        $observers = is_array($observers) ? $observers : [$observers];

        array_map(function ($observer) {
            $this->app->bind($observer, function () use ($observer) {
                return $this->getMockBuilder($observer)->disableOriginalConstructor()->getMock();
            });
        }, $observers);

        return $this;
    }
public function withoutObservers($observers)
    {
        $observers = is_array($observers) ? $observers : [$observers];

        array_map(function ($observer) {
            $this->app->bind($observer, function () use ($observer) {
                return $this->getMockBuilder($observer)->disableOriginalConstructor()->getMock();
            });
        }, $observers);

        return $this;
    }
public function withoutObservers ( $ observers ) { $ observers = is_array ( $ observers ) ? $ observers : [ $ observers ] ; array_map ( function ( $ observer ) { $ this -> app -> bind ( $ observer , function ( ) use ( $ observer ) { return $ this -> getMockBuilder ( $ observer ) -> disableOriginalConstructor ( ) -> getMock ( ) ; } ) ; } , $ observers ) ; return $ this ; }
Specify a list of observers that will not run for the given operation.

@param  array|string  $observers
@return $this
Specify a list of observers that will not run for the given operation .