Property | Type | Description | |
---|---|---|---|
$_closures | Closure | Stub implementation. | |
$_return | mixed | The method return value. | |
$_returnIndex | integer | Index value in the Method::$_returns/Method::$_closures array. | |
$_returns | array | Return values. | |
$_substituteIndex | integer | Index value in the Method::$_substitutes array. | |
$_substitutes | array | Return values. |
Method | Description | |
---|---|---|
__construct ( array $config = [] ) | The Constructor. | |
__invoke ( array $args = [], string $self = null ) : mixed | Runs the stub. | |
actualReturn ( ) : mixed | Get the actual return value. | |
andReturn ( ) | Set return values. | |
andRun ( ) | Set the stub logic. | |
substitute ( ) : mixed | Get the method substitute. | |
toBe ( ) | Set return values. |
public __construct ( array $config = [] ) | ||
$config | array | The options array, possible options are: - `'closure'`: the closure to execute for this stub. - `'args'`: the arguments required for exectuting this stub. - `'static'`: the type of call required for exectuting this stub. - `'returns'`: the returns values for this stub (used only if the `'closure'` option is missing). |
public actualReturn ( ) : mixed | ||
return | mixed |
protected int $_returnIndex | ||
return | integer |
protected int $_substituteIndex | ||
return | integer |