1 user_views_argument_validate.test UserViewsArgumentValidate::view_argument_validate_user($argtype)

File

core/modules/user/tests/user_views_argument_validate.test, line 82
Definition of UserViewsArgumentValidate.

Class

UserViewsArgumentValidate
Tests views user argument argument handler.

Code

function view_argument_validate_user($argtype) {
  $view = new view;
  $view->name = 'view_argument_validate_user';
  $view->description = '';
  $view->tag = '';
  $view->view_php = '';
  $view->base_table = 'node';
  $view->is_cacheable = FALSE;
  $view->api_version = 2;
  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

  /* Display: Default */
  $handler = $view->new_display('default', 'Default', 'default');
  $handler->display->display_options['access']['type'] = 'none';
  $handler->display->display_options['cache']['type'] = 'none';
  $handler->display->display_options['exposed_form']['type'] = 'basic';
  $handler->display->display_options['pager']['type'] = 'full';
  $handler->display->display_options['style_plugin'] = 'default';
  $handler->display->display_options['row_plugin'] = 'fields';
  /* Argument: Global: Null */
  $handler->display->display_options['arguments']['null']['id'] = 'null';
  $handler->display->display_options['arguments']['null']['table'] = 'views';
  $handler->display->display_options['arguments']['null']['field'] = 'null';
  $handler->display->display_options['arguments']['null']['style_plugin'] = 'default_summary';
  $handler->display->display_options['arguments']['null']['default_argument_type'] = 'fixed';
  $handler->display->display_options['arguments']['null']['validate']['type'] = 'user';
  $handler->display->display_options['arguments']['null']['validate_options']['type'] = $argtype;
  $handler->display->display_options['arguments']['null']['must_not_be'] = 0;

  return $view;
}