PHP Class Eloquent\Phony\Mock\Builder\MockBuilderFactory

Datei anzeigen Open project: eloquent/phony

Public Methods

Method Description
__construct ( MockFactory $mockFactory, HandleFactory $handleFactory, InvocableInspector $invocableInspector, FeatureDetector $featureDetector ) Construct a new mock builder factory.
create ( mixed $types = [] ) : MockBuilder Create a new mock builder.
instance ( ) : MockBuilderFactory Get the static instance of this factory.

Method Details

__construct() public method

Construct a new mock builder factory.
public __construct ( MockFactory $mockFactory, HandleFactory $handleFactory, InvocableInspector $invocableInspector, FeatureDetector $featureDetector )
$mockFactory Eloquent\Phony\Mock\MockFactory The mock factory to use.
$handleFactory Eloquent\Phony\Mock\Handle\HandleFactory The handle factory to use.
$invocableInspector Eloquent\Phony\Invocation\InvocableInspector The invocable inspector.
$featureDetector Eloquent\Phony\Reflection\FeatureDetector The feature detector to use.

create() public method

Each value in $types can be either a class name, or an ad hoc mock definition. If only a single type is being mocked, the class name or definition can be passed without being wrapped in an array.
public create ( mixed $types = [] ) : MockBuilder
$types mixed The types to mock.
return MockBuilder The mock builder.

instance() public static method

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