PHP Class kahlan\Allow

Show file Open project: crysalead/kahlan

Protected Properties

Property Type Description
$_actual string | object A fully-namespaced function name.
$_isClass boolean Boolean indicating if actual is a class or not.
$_method object The method instance.
$_stub string | object The stub.

Public Methods

Method Description
__construct ( string | object $actual ) Constructor
andReturn ( ) Set return values.
andRun ( ) Set return values.
toBe ( ) Sets the stub logic.
toBeCalled ( ) : self. Stub function.
toBeOK ( ) Sets the stub logic.
toReceive ( ) : self. Stub a chain of methods.

Method Details

__construct() public method

Constructor
public __construct ( string | object $actual )
$actual string | object A fully-namespaced class name or an object instance.

andReturn() public method

Set return values.
public andReturn ( )

andRun() public method

Set return values.
public andRun ( )

toBe() public method

Sets the stub logic.
public toBe ( )

toBeCalled() public method

Stub function.
public toBeCalled ( ) : self.
return self.

toBeOK() public method

Sets the stub logic.
public toBeOK ( )

toReceive() public method

Stub a chain of methods.
public toReceive ( ) : self.
return self.

Property Details

$_actual protected property

A fully-namespaced function name.
protected string|object $_actual
return string | object

$_isClass protected property

Boolean indicating if actual is a class or not.
protected bool $_isClass
return boolean

$_method protected property

The method instance.
protected object $_method
return object

$_stub protected property

The stub.
protected string|object $_stub
return string | object