trait InteractsWithContainer (View source)
| protected Vite|null | $originalVite | The original Vite handler. | |
| protected Mix|null | $originalMix | The original Laravel Mix handler. |
| 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|null $mock = null)
Mock an instance of an object in the container. | |
| MockInterface | partialMock(string $abstract, Closure|null $mock = null)
Mock a partial instance of an object in the container. | |
| MockInterface | spy(string $abstract, Closure|null $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($entrypoints, $buildDirectory = null) No description | ||
| __call($method, $parameters) No description | ||
| __toString() No description | ||
| useIntegrityKey($key) No description | ||
| useBuildDirectory($path) No description | ||
| useHotFile($path) No description | ||
| withEntryPoints($entryPoints) No description | ||
| useScriptTagAttributes($attributes) No description | ||
| useStyleTagAttributes($attributes) No description | ||
| usePreloadTagAttributes($attributes) No description | ||
| preloadedAssets() No description | ||
| reactRefresh() No description | ||
| content($asset, $buildDirectory = null) No description | ||
| asset($asset, $buildDirectory = null) No description |
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.
Mock a partial instance of an object in the container.
Spy an instance of an object in the container.
Instruct the container to forget a previously mocked / spied instance of an object.
Register an empty handler for Vite in the container.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.html