protected function RangeViewsFilterTestCase::getRangeFieldViewsFilterTestView in Range 7
Returns view for testing range field views filter.
Return value
view View object.
1 call to RangeViewsFilterTestCase::getRangeFieldViewsFilterTestView()
- RangeViewsFilterTestCase::testRangeFieldViewsFilter in tests/
views/ range.views.filter.test - Tests range field views filter.
File
- tests/
views/ range.views.filter.test, line 108 - Contains range views filter handler test class.
Class
- RangeViewsFilterTestCase
- Tests range views filter handler.
Code
protected function getRangeFieldViewsFilterTestView() {
$view = new view();
$view->name = 'test_range_filter';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'test_range_filter';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE;
/* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view
->new_display('default', 'Master', 'default');
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$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';
/* Field: Indexed Node: Node ID */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['label'] = '';
$handler->display->display_options['fields']['nid']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['nid']['link_to_entity'] = 0;
/* Filter criterion: Indexed Node: Range integer range filter */
$handler->display->display_options['filters']['field_range_integer']['id'] = 'field_range_integer';
$handler->display->display_options['filters']['field_range_integer']['table'] = 'field_data_field_range_integer';
$handler->display->display_options['filters']['field_range_integer']['field'] = 'field_range_integer';
return $view;
}