protected static function _createChainResponse($mockClassInstanceId, $mockClassType, $chainedMethodsBefore, $currentMethod, $args)
{
$currentMethodName = key($currentMethod);
$rReturnValues =& self::getMockHierarchyResponse($chainedMethodsBefore, $mockClassType, $mockClassInstanceId);
// Check current method exist in return values chain
$serializedArgs = serialize($args);
if (!isset($rReturnValues[$currentMethodName][$serializedArgs]['response'])) {
$serializedArgs = static::checkMatchingArguments($rReturnValues[$currentMethodName], $args);
if (is_null($serializedArgs)) {
return null;
}
}
return self::generateResponse($rReturnValues[$currentMethodName][$serializedArgs]['response'], $args);
}