class FakeProvider implements Provider

Traits

Properties

protected Provider|null $provider

The original provider instance.

Methods

mixed
forwardCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object.

mixed
forwardDecoratedCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object, returning $this if the forwarded call returned itself.

static never
throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

__construct(string $driver, Closure $resolver, User|Closure|null $user = null)

Create a new fake provider instance.

redirect()

Redirect the user to the authentication page for the provider.

user()

Get the User instance for the authenticated user.

provider()

Get the original provider instance.

mixed
__call(string $method, array $parameters)

Handle calls to methods that are not available on the fake provider.

Details

in ForwardsCalls at line 22
protected mixed forwardCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object.

Parameters

mixed $object
string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

in ForwardsCalls at line 52
protected mixed forwardDecoratedCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object, returning $this if the forwarded call returned itself.

Parameters

mixed $object
string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

in ForwardsCalls at line 66
static protected never throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

Parameters

string $method

Return Value

never

Exceptions

BadMethodCallException

at line 25
__construct(string $driver, Closure $resolver, User|Closure|null $user = null)

Create a new fake provider instance.

Parameters

string $driver
Closure $resolver
User|Closure|null $user

at line 35
RedirectResponse redirect()

Redirect the user to the authentication page for the provider.

Return Value

RedirectResponse

at line 43
User user()

Get the User instance for the authenticated user.

Return Value

User

at line 55
Provider provider()

Get the original provider instance.

Return Value

Provider

at line 67
mixed __call(string $method, array $parameters)

Handle calls to methods that are not available on the fake provider.

Parameters

string $method
array $parameters

Return Value

mixed