mock_objects.php
protected function checkArgumentsIsArray($args, $task)
    {
        if (! is_array($args)) {
            $errormsg = sprintf('Cannot %s. Parameter %s is not an array.', $task, $args);
            trigger_error($errormsg, E_USER_ERROR);
        }
    }
protected function checkArgumentsIsArray($args, $task)
    {
        if (! is_array($args)) {
            $errormsg = sprintf('Cannot %s. Parameter %s is not an array.', $task, $args);
            trigger_error($errormsg, E_USER_ERROR);
        }
    }
Die if bad arguments array is passed.

@param mixed $args     The arguments value to be checked.
@param string $task    Description of task attempt.

@return bool        Valid arguments