mock_objects.php
public function returnsByValueAt($timing, $method, $value, $args = false)
    {
        $this->dieOnNoMethod($method, 'set return value sequence');
        $this->actions->registerAt($timing, $method, $args, new SimpleByValue($value));
    }
public function returnsByValueAt($timing, $method, $value, $args = false)
    {
        $this->dieOnNoMethod($method, 'set return value sequence');
        $this->actions->registerAt($timing, $method, $args, new SimpleByValue($value));
    }
Sets a return for a parameter list that
will be passed by value only when the required call count is reached.

@param int $timing       Number of calls in the future to which the result applies.
If not set then all calls will return the value.
@param string $method    Method name.
@param mixed $value      Result of call passed by value.
@param array $args       List of parameters to match including wildcards.