trait ResolvesProviderOptions

Properties

protected array<string, string>|SerializableClosure $headers
protected array<string, mixed>|SerializableClosure $providerOptions

Methods

withHeaders(array|Closure $headers)

Specify HTTP headers for the request. Closures may only capture serializable values.

withProviderOptions(array|Closure $options)

Specify provider-specific options for the request.

array
resolveProviderOptionsAndHeaders(Provider $provider)

Resolve the request body options and HTTP headers for the given provider.

array
queuedProviderOptions()

Get the serializable provider options recorded by queued fakes.

Details

at line 24
ResolvesProviderOptions withHeaders(array|Closure $headers)

Specify HTTP headers for the request. Closures may only capture serializable values.

Parameters

array|Closure $headers

Return Value

ResolvesProviderOptions

at line 38
ResolvesProviderOptions withProviderOptions(array|Closure $options)

Specify provider-specific options for the request.

Parameters

array|Closure $options

Return Value

ResolvesProviderOptions

at line 54
protected array resolveProviderOptionsAndHeaders(Provider $provider)

Resolve the request body options and HTTP headers for the given provider.

Unlike upstream, accept the contract so custom provider implementations need not extend the base class.

Parameters

Provider $provider

Return Value

array

at line 67
protected array queuedProviderOptions()

Get the serializable provider options recorded by queued fakes.

Return Value

array