InteractsWithContainer
trait InteractsWithContainer (View source)
Properties
| protected Vite|null | $originalVite | The original Vite handler. | |
| protected Mix|null | $originalMix | The original Laravel Mix handler. |
Methods
| 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. | |
| MockInterface | mock(string $abstract, Closure $mock = null)
Mock an instance of an object in the container. | |
| MockInterface | partialMock(string $abstract, Closure $mock = null)
Mock a partial instance of an object in the container. | |
| MockInterface | spy(string $abstract, Closure $mock = null)
Spy an instance of an object in the container. | |
| $this | forgetMock(string $abstract)
Instruct the container to forget a previously mocked / spied instance of an object. | |
| $this | withoutVite()
Register an empty handler for Vite in the container. | |
| __invoke() No description | ||
| __call($name, $arguments) No description | ||
| __toString() No description | ||
| useIntegrityKey() No description | ||
| useBuildDirectory() No description | ||
| useHotFile() No description | ||
| withEntryPoints() No description | ||
| useScriptTagAttributes() No description | ||
| useStyleTagAttributes() No description | ||
| preloadedAssets() No description |
Details
protected object swap(string $abstract, object $instance)
Register an instance of an object in the container.
protected object instance(string $abstract, object $instance)
Register an instance of an object in the container.
protected MockInterface mock(string $abstract, Closure $mock = null)
Mock an instance of an object in the container.
protected MockInterface partialMock(string $abstract, Closure $mock = null)
Mock a partial instance of an object in the container.
protected MockInterface spy(string $abstract, Closure $mock = null)
Spy an instance of an object in the container.
protected $this forgetMock(string $abstract)
Instruct the container to forget a previously mocked / spied instance of an object.
protected $this withoutVite()
Register an empty handler for Vite in the container.
__invoke()
No description
__call($name, $arguments)
No description
__toString()
No description
useIntegrityKey()
No description
useBuildDirectory()
No description
useHotFile()
No description
withEntryPoints()
No description
useScriptTagAttributes()
No description
useStyleTagAttributes()
No description
preloadedAssets()
No description
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/9.x/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.html