SimpleMock::returnsByReference PHP Method

returnsByReference() public method

Sets a return for a parameter list that will be passed by reference for all calls.
public returnsByReference ( string $method, mixed &$reference, array $args = false )
$method string Method name.
$reference mixed Result of the call will be this object.
$args array List of parameters to match including wildcards.
    public function returnsByReference($method, &$reference, $args = false)
    {
        $this->dieOnNoMethod($method, 'set return reference');
        $this->actions->register($method, $args, new SimpleByReference($reference));
    }