mock_objects.php
protected function checkExpectations($method, $args, $timing)
    {
        $test = $this->getCurrentTestCase();
        if (isset($this->max_counts[$method])) {
            if (! $this->max_counts[$method]->test($timing + 1)) {
                $test->assert($this->max_counts[$method], $timing + 1);
            }
        }
        if (isset($this->expected_args_at[$timing][$method])) {
            $test->assert(
                    $this->expected_args_at[$timing][$method],
                    $args,
                    "Mock method [$method] at [$timing] -> %s");
        } elseif (isset($this->expected_args[$method])) {
            $test->assert(
                    $this->expected_args[$method],
                    $args,
                    "Mock method [$method] -> %s");
        }
    }
protected function checkExpectations($method, $args, $timing)
    {
        $test = $this->getCurrentTestCase();
        if (isset($this->max_counts[$method])) {
            if (! $this->max_counts[$method]->test($timing + 1)) {
                $test->assert($this->max_counts[$method], $timing + 1);
            }
        }
        if (isset($this->expected_args_at[$timing][$method])) {
            $test->assert(
                    $this->expected_args_at[$timing][$method],
                    $args,
                    "Mock method [$method] at [$timing] -> %s");
        } elseif (isset($this->expected_args[$method])) {
            $test->assert(
                    $this->expected_args[$method],
                    $args,
                    "Mock method [$method] -> %s");
        }
    }
protected function checkExpectations ( $ method , $ args , $ timing ) { $ test = $ this -> getCurrentTestCase ( ) ; if ( isset ( $ this -> max_counts [ $ method ] ) ) { if ( ! $ this -> max_counts [ $ method ] -> test ( $ timing + 1 ) ) { $ test -> assert ( $ this -> max_counts [ $ method ] , $ timing + 1 ) ; } } if ( isset ( $ this -> expected_args_at [ $ timing ] [ $ method ] ) ) { $ test -> assert ( $ this -> expected_args_at [ $ timing ] [ $ method ] , $ args , "Mock method [$method] at [$timing] -> %s" ) ; } elseif ( isset ( $ this -> expected_args [ $ method ] ) ) { $ test -> assert ( $ this -> expected_args [ $ method ] , $ args , "Mock method [$method] -> %s" ) ; } }
Tests the arguments against expectations.

@param string $method Method to check.
@param array  $args   Argument list to match.
@param int    $timing The position of this call in the call history.
Tests the arguments against expectations .