PAGI\Client\Impl\MockedClientImpl::assertCall PHP Method

assertCall() private method

private assertCall ( $methodName, array $arguments )
$arguments array
    private function assertCall($methodName, array $arguments)
    {
        if (!isset($this->methodCallAsserts[$methodName])) {
            return true;
        }
        $args = array_shift($this->methodCallAsserts[$methodName]);
        if (empty($this->methodCallAsserts[$methodName])) {
            unset($this->methodCallAsserts[$methodName]);
        }
        $count = count($args);
        for ($i = 0; $i < $count; $i++) {
            if (!isset($arguments[$i])) {
                throw new MockedException("Missing argument number " . $i + 1);
            }
            $arg = $arguments[$i];
            if ($arg !== $args[$i]) {
                throw new MockedException("Arguments mismatch for {$methodName}: called with: " . print_r($arguments, true) . " expected: " . print_r($args, true));
            }
        }
        return true;
    }