SimpleMock::returnsByReferenceAt PHP Méthode

returnsByReferenceAt() public méthode

Sets a return for a parameter list that will be passed by value only when the required call count is reached.
public returnsByReferenceAt ( integer $timing, string $method, mixed &$reference, array $args = false )
$timing integer Number of calls in the future to which the result applies. If not set then all calls will return the value.
$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 returnsByReferenceAt($timing, $method, &$reference, $args = false)
    {
        $this->dieOnNoMethod($method, 'set return reference sequence');
        $this->actions->registerAt($timing, $method, $args, new SimpleByReference($reference));
    }