mock_objects.php
protected function describeDifference($expected, $parameters)
    {
        if (count($expected) != count($parameters)) {
            return sprintf(
                'Expected %s arguments of [%s], but got %s arguments of [%s]',
                    count($expected),
                    $this->renderArguments($expected),
                    count($parameters),
                    $this->renderArguments($parameters)
            );
        }
        $messages = array();
        for ($i = 0; $i < count($expected); $i++) {
            $comparison = $this->forceToExpectation($expected[$i]);
            if (! $comparison->test($parameters[$i])) {
                $messages[] = 'parameter ' . ($i + 1) . ' with [' .
                        $comparison->overlayMessage($parameters[$i], $this->getDumper()) . ']';
            }
        }

        return 'Parameter expectation differs at ' . implode(' and ', $messages);
    }
protected function describeDifference($expected, $parameters)
    {
        if (count($expected) != count($parameters)) {
            return sprintf(
                'Expected %s arguments of [%s], but got %s arguments of [%s]',
                    count($expected),
                    $this->renderArguments($expected),
                    count($parameters),
                    $this->renderArguments($parameters)
            );
        }
        $messages = array();
        for ($i = 0; $i < count($expected); $i++) {
            $comparison = $this->forceToExpectation($expected[$i]);
            if (! $comparison->test($parameters[$i])) {
                $messages[] = 'parameter ' . ($i + 1) . ' with [' .
                        $comparison->overlayMessage($parameters[$i], $this->getDumper()) . ']';
            }
        }

        return 'Parameter expectation differs at ' . implode(' and ', $messages);
    }
protected function describeDifference ( $ expected , $ parameters ) { if ( count ( $ expected ) != count ( $ parameters ) ) { return sprintf ( 'Expected %s arguments of [%s], but got %s arguments of [%s]' , count ( $ expected ) , $ this -> renderArguments ( $ expected ) , count ( $ parameters ) , $ this -> renderArguments ( $ parameters ) ) ; } $ messages = array ( ) ; for ( $ i = 0 ; $ i < count ( $ expected ) ; $ i ++ ) { $ comparison = $ this -> forceToExpectation ( $ expected [ $ i ] ) ; if ( ! $ comparison -> test ( $ parameters [ $ i ] ) ) { $ messages [ ] = 'parameter ' . ( $ i + 1 ) . ' with [' . $ comparison -> overlayMessage ( $ parameters [ $ i ] , $ this -> getDumper ( ) ) . ']' ; } } return 'Parameter expectation differs at ' . implode ( ' and ' , $ messages ) ; }
Message to display if expectation differs from the parameters actually received.

@param array $expected      Expected parameters as list.
@param array $parameters    Actual parameters received.

@return string              Description of difference.
Message to display if expectation differs from the parameters actually received .