PHP Class Eloquent\Phony\Mock\Handle\HandleFactory

Mostrar archivo Open project: eloquent/phony Class Usage Examples

Public Methods

Method Description
__construct ( StubFactory $stubFactory, StubVerifierFactory $stubVerifierFactory, AssertionRenderer $assertionRenderer, Eloquent\Phony\Assertion\AssertionRecorder $assertionRecorder, Invoker $invoker ) Construct a new handle factory.
instance ( ) : HandleFactory Get the static instance of this factory.
instanceHandle ( Eloquent\Phony\Mock\Mock | InstanceHandle $mock, string | null $label = null ) : InstanceHandle Create a new handle.
staticHandle ( Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\Handle | ReflectionClas\ReflectionClass | string $class ) : StaticHandle Create a new static handle.

Method Details

__construct() public method

Construct a new handle factory.
public __construct ( StubFactory $stubFactory, StubVerifierFactory $stubVerifierFactory, AssertionRenderer $assertionRenderer, Eloquent\Phony\Assertion\AssertionRecorder $assertionRecorder, Invoker $invoker )
$stubFactory Eloquent\Phony\Stub\StubFactory The stub factory to use.
$stubVerifierFactory Eloquent\Phony\Stub\StubVerifierFactory The stub verifier factory to use.
$assertionRenderer Eloquent\Phony\Assertion\AssertionRenderer The assertion renderer to use.
$assertionRecorder Eloquent\Phony\Assertion\AssertionRecorder The assertion recorder to use.
$invoker Eloquent\Phony\Invocation\Invoker The invoker to use.

instance() public static method

Get the static instance of this factory.
public static instance ( ) : HandleFactory
return HandleFactory The static factory.

instanceHandle() public method

Create a new handle.
public instanceHandle ( Eloquent\Phony\Mock\Mock | InstanceHandle $mock, string | null $label = null ) : InstanceHandle
$mock Eloquent\Phony\Mock\Mock | InstanceHandle The mock.
$label string | null The label.
return InstanceHandle The newly created handle.

staticHandle() public method

Create a new static handle.
public staticHandle ( Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\Handle | ReflectionClas\ReflectionClass | string $class ) : StaticHandle
$class Eloquent\Phony\Mock\Mock | Eloquent\Phony\Mock\Handle\Handle | ReflectionClas\ReflectionClass | string The class.
return StaticHandle The newly created handle.