PHP Class Eloquent\Phony\Call\CallFactory

Datei anzeigen Open project: eloquent/phony Class Usage Examples

Public Methods

Method Description
__construct ( CallEventFactory $eventFactory, Invoker $invoker ) Construct a new call factory.
instance ( ) : CallFactory Get the static instance of this factory.
record ( callable $callback, Arguments $arguments, SpyData $spy ) : CallData Record call details by invoking a callback.

Method Details

__construct() public method

Construct a new call factory.
public __construct ( CallEventFactory $eventFactory, Invoker $invoker )
$eventFactory Eloquent\Phony\Call\Event\CallEventFactory The call event factory 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 ( ) : CallFactory
return CallFactory The static factory.

record() public method

Record call details by invoking a callback.
public record ( callable $callback, Arguments $arguments, SpyData $spy ) : CallData
$callback callable The callback.
$arguments Arguments The arguments.
$spy Eloquent\Phony\Spy\SpyData The spy to record the call to.
return CallData The newly created call.