Method |
Description |
|
__clone ( ) |
Clone this builder. |
|
__construct ( mixed $types, MockFactory $factory, HandleFactory $handleFactory, InvocableInspector $invocableInspector, FeatureDetector $featureDetector ) |
Construct a new mock builder. |
|
addConstant ( string $name, mixed $value ) |
Add a custom class constant. |
|
addMethod ( string $name, callable | null $callback = null ) |
Add a custom method. |
|
addProperty ( string $name, mixed $value = null ) |
Add a custom property. |
|
addStaticMethod ( string $name, callable | null $callback = null ) |
Add a custom static method. |
|
addStaticProperty ( string $name, mixed $value = null ) |
Add a custom static property. |
|
build ( boolean $createNew = false ) : ReflectionClass |
Generate and define the mock class. |
|
className ( boolean $createNew = false ) : string |
Generate and define the mock class, and return the class name. |
|
definition ( ) : MockDefinition |
Get the mock definitions. |
|
factory ( ) : MockFactory |
Get the factory. |
|
featureDetector ( ) : FeatureDetector |
Get the feature detector. |
|
finalize ( ) |
Finalize the mock builder. |
|
full ( ) : Eloquent\Phony\Mock\Mock |
Create a new full mock. |
|
get ( ) : Eloquent\Phony\Mock\Mock |
Get a mock. |
|
handleFactory ( ) : HandleFactory |
Get the handle factory. |
|
invocableInspector ( ) : InvocableInspector |
Get the invocable inspector. |
|
isBuilt ( ) : boolean |
Returns true if the mock class has been built. |
|
isFinalized ( ) : boolean |
Returns true if this builder is finalized. |
|
like ( mixed $type ) |
Add classes, interfaces, or traits. |
|
named ( string | null $className = null ) |
Set the class name. |
|
partial ( ) : Eloquent\Phony\Mock\Mock |
Create a new partial mock. |
|
partialWith ( Arguments | array | null $arguments = [] ) : Eloquent\Phony\Mock\Mock |
Create a new partial mock. |
|
source ( MockGenerator $generator = null ) : string |
Get the generated source code of the mock class. |
|
types ( ) : ReflectionClass>\array |
Get the types. |
|