trait Illuminate / Foundation / Testing / Concerns / InteractsWithContainer
You are viewing an older version of the documentation. For the latest, please visit master documentation.

InteractsWithContainer

Properties

protected

$originalMix Mix |null

The original Laravel Mix handler.

Default: null

Methods

protected

swap ( $abstract , $instance ) : object

Register an instance of an object in the container.

Parameters

  • $abstract string
  • $instance object
protected

instance ( $abstract , $instance ) : object

Register an instance of an object in the container.

Parameters

  • $abstract string
  • $instance object
protected

mock ( $abstract , Closure $mock ) : Mockery\MockInterface

Mock an instance of an object in the container.

Parameters

protected

partialMock ( $abstract , Closure $mock ) : Mockery\MockInterface

Mock a partial instance of an object in the container.

Parameters

protected

spy ( $abstract , Closure $mock ) : Mockery\MockInterface

Spy an instance of an object in the container.

Parameters

protected

forgetMock ( $abstract ) : $this

Instruct the container to forget a previously mocked / spied instance of an object.

Parameters

  • $abstract string
protected

withoutMix ( ) : $this

Register an empty handler for Laravel Mix in the container.

protected

withMix ( ) : $this

Register an empty handler for Laravel Mix in the container.