MocksApplicationServices (Foundation\Testing)
MocksApplicationServices
trait MocksApplicationServices (View source)
Methods
$this | expectsEvents( array|string $events) Specify a list of events that should be fired for the given operation. | |
$this | doesntExpectEvents( array|string $events) Specify a list of events that should not be fired for the given operation. | |
$this | withoutObservers( array|string $observers) Specify a list of observers that will not run for the given operation. |
Details
$this expectsEvents( array|string $events)
Specify a list of events that should be fired for the given operation.
These events will be mocked, so that handlers will not actually be executed.
$this doesntExpectEvents( array|string $events)
Specify a list of events that should not be fired for the given operation.
These events will be mocked, so that handlers will not actually be executed.
$this withoutObservers( array|string $observers)
Specify a list of observers that will not run for the given operation.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.html