mock_objects.php
public function expectAt($timing, $method, $args, $message = '%s')
    {
        $this->dieOnNoMethod($method, 'set expected arguments at time');
        $this->checkArgumentsIsArray($args, 'set expected arguments at time');
        $args = $this->replaceWildcards($args);
        if (! isset($this->expected_args_at[$timing])) {
            $this->expected_args_at[$timing] = array();
        }
        $method = strtolower($method);
        $message .= Mock::getExpectationLine();
        $this->expected_args_at[$timing][$method] =
                new ParametersExpectation($args, $message);
    }
public function expectAt($timing, $method, $args, $message = '%s')
    {
        $this->dieOnNoMethod($method, 'set expected arguments at time');
        $this->checkArgumentsIsArray($args, 'set expected arguments at time');
        $args = $this->replaceWildcards($args);
        if (! isset($this->expected_args_at[$timing])) {
            $this->expected_args_at[$timing] = array();
        }
        $method = strtolower($method);
        $message .= Mock::getExpectationLine();
        $this->expected_args_at[$timing][$method] =
                new ParametersExpectation($args, $message);
    }
public function expectAt ( $ timing , $ method , $ args , $ message = '%s' ) { $ this -> dieOnNoMethod ( $ method , 'set expected arguments at time' ) ; $ this -> checkArgumentsIsArray ( $ args , 'set expected arguments at time' ) ; $ args = $ this -> replaceWildcards ( $ args ) ; if ( ! isset ( $ this -> expected_args_at [ $ timing ] ) ) { $ this -> expected_args_at [ $ timing ] = array ( ) ; } $ method = strtolower ( $ method ) ; $ message .= Mock :: getExpectationLine ( ) ; $ this -> expected_args_at [ $ timing ] [ $ method ] = new ParametersExpectation ( $ args , $ message ) ; }
Sets up an expected call with a set of expected parameters in that call.
The expected call count will be adjusted if it is set too low to reach this call.

@param int $timing        Number of calls in the future at which to test. Next call is 0.
@param string $method     Method call to test.
@param array $args        Expected parameters for the call including wildcards.
@param string $message    Overridden message.
Sets up an expected call with a set of expected parameters in that call . The expected call count will be adjusted if it is set too low to reach this call .