SimpleMock::checkExpectations PHP Méthode

checkExpectations() protected méthode

Tests the arguments against expectations.
protected checkExpectations ( string $method, array $args, integer $timing )
$method string Method to check.
$args array Argument list to match.
$timing integer The position of this call in the call history.
    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");
        }
    }