abstract class AbstractInvocationImplementation implements InvocationStubber (View source)

internal  This class is not covered by the backward compatibility promise for PHPUnit
 

Properties

protected InvocationHandler $invocationHandler
protected Matcher $matcher
protected ConfigurableMethod> $configurableMethods
protected ?array<string,int> $configurableMethodNames

Methods

__construct(InvocationHandler $handler, Matcher $matcher, ConfigurableMethod ...$configurableMethods)

No description

method(Constraint|PropertyHook|string $constraint)

No description

will(Stub $stub)

No description

willReturn(mixed $value, mixed ...$nextValues)

No description

willReturnReference(mixed $reference)

No description

willReturnMap(array $valueMap)

No description

willReturnArgument(int $argumentIndex)

No description

willReturnCallback(callable $callback)

No description

willReturnOnConsecutiveCalls(mixed ...$values)

No description

willThrowException(Throwable $exception)

No description

void
seal()

No description

void

Details

final __construct(InvocationHandler $handler, Matcher $matcher, ConfigurableMethod ...$configurableMethods)

No description

Parameters

InvocationHandler $handler
Matcher $matcher
ConfigurableMethod ...$configurableMethods

final InvocationStubber will(Stub $stub)

No description

Parameters

Stub $stub

Return Value

InvocationStubber

final InvocationStubber willReturn(mixed $value, mixed ...$nextValues)

No description

Parameters

mixed $value
mixed ...$nextValues

Return Value

InvocationStubber

Exceptions

IncompatibleReturnValueException

final InvocationStubber willReturnReference(mixed $reference)

No description

Parameters

mixed $reference

Return Value

InvocationStubber

final InvocationStubber willReturnMap(array $valueMap)

No description

Parameters

array $valueMap

Return Value

InvocationStubber

final InvocationStubber willReturnArgument(int $argumentIndex)

No description

Parameters

int $argumentIndex

Return Value

InvocationStubber

final InvocationStubber willReturnCallback(callable $callback)

No description

Parameters

callable $callback

Return Value

InvocationStubber

final InvocationStubber willReturnSelf()

No description

Return Value

InvocationStubber

final InvocationStubber willReturnOnConsecutiveCalls(mixed ...$values)

No description

Parameters

mixed ...$values

Return Value

InvocationStubber

final InvocationStubber willThrowException(Throwable $exception)

No description

Parameters

Throwable $exception

Return Value

InvocationStubber

final void seal()

No description

Return Value

void

final protected void ensureParametersCanBeConfigured()