trait InteractsWithContainer (View source)
object | swap(string $abstract, object $instance) Register an instance of an object in the container. | |
object | instance(string $abstract, object $instance) Register an instance of an object in the container. | |
object | mock(string $abstract, Closure $mock = null) Mock an instance of an object in the container. | |
object | spy(string $abstract, Closure $mock = null) Spy an instance of an object in the container. |
Register an instance of an object in the container.
Register an instance of an object in the container.
Mock an instance of an object in the container.
Spy an instance of an object in the container.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.8/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.html