InteractsWithContainer
trait InteractsWithContainer
Properties
| protected Vite|null | $originalVite | The original Vite handler. |
|
| protected DeferredCallbackCollection|null | $originalDeferredCallbacksCollection | The original deferred callbacks collection. |
Methods
Register an instance in the container.
Register an instance in the container.
Mock a partial instance of an object in the container.
Instruct the container to forget a previously mocked / spied instance of an object.
Register a Vite handler that returns empty strings for all assets.
Return empty asset markup.
Return an empty result for dynamic calls.
Return empty asset markup as a string.
Ignore integrity key configuration.
Ignore build directory configuration.
Ignore hot file configuration.
Ignore entry point configuration.
Ignore script tag attributes.
Ignore style tag attributes.
Ignore preload tag attributes.
Return an empty list of preloaded assets.
Return empty React refresh markup.
Return empty asset content.
Return an empty asset URL.
Details
at line 35
protected mixed
swap(string $abstract, mixed $instance)
Register an instance in the container.
at line 48
protected mixed
instance(string $abstract, mixed $instance)
Register an instance in the container.
at line 63
protected MockInterface
mock(string $abstract, Closure|null $mock = null)
Mock an instance of an object in the container.
at line 76
protected MockInterface
partialMock(string $abstract, Closure|null $mock = null)
Mock a partial instance of an object in the container.
at line 89
protected MockInterface
spy(string $abstract, Closure|null $mock = null)
Spy an instance of an object in the container.
at line 99
protected InteractsWithContainer
forgetMock(string $abstract)
Instruct the container to forget a previously mocked / spied instance of an object.
at line 111
protected InteractsWithContainer
withoutVite()
Register a Vite handler that returns empty strings for all assets.
at line 123
HtmlString
__invoke(string|array $entrypoints, string|null $buildDirectory = null)
Return empty asset markup.
at line 131
mixed
__call(string $method, array $parameters)
Return an empty result for dynamic calls.
at line 139
string
__toString()
Return empty asset markup as a string.
at line 147
InteractsWithContainer
useIntegrityKey(string|false $key)
Ignore integrity key configuration.
at line 155
InteractsWithContainer
useBuildDirectory(string $path)
Ignore build directory configuration.
at line 163
InteractsWithContainer
useHotFile(string $path)
Ignore hot file configuration.
at line 171
InteractsWithContainer
withEntryPoints(array $entryPoints)
Ignore entry point configuration.
at line 179
InteractsWithContainer
useScriptTagAttributes(array|callable $attributes)
Ignore script tag attributes.
at line 187
InteractsWithContainer
useStyleTagAttributes(array|callable $attributes)
Ignore style tag attributes.
at line 195
InteractsWithContainer
usePreloadTagAttributes(array|callable|false $attributes)
Ignore preload tag attributes.
at line 203
array
preloadedAssets()
Return an empty list of preloaded assets.
at line 211
HtmlString
reactRefresh()
Return empty React refresh markup.
at line 219
string
content(string $asset, string|null $buildDirectory = null)
Return empty asset content.
at line 227
string
asset(string $asset, string|null $buildDirectory = null)
Return an empty asset URL.