protected function RangeViewsFilterTestCase::getRangeSearchApiViewsFilterTestView in Range 7
Returns view for testing range search API views filter.
Return value
view View object.
1 call to RangeViewsFilterTestCase::getRangeSearchApiViewsFilterTestView()
- RangeViewsFilterTestCase::testRangeSearchApiViewsFilter in tests/
views/ range.views.filter.test - Tests range search API views filter.
File
- tests/
views/ range.views.filter.test, line 150 - Contains range views filter handler test class.
Class
- RangeViewsFilterTestCase
- Tests range views filter handler.
Code
protected function getRangeSearchApiViewsFilterTestView() {
$view = new view();
$view->name = 'test_range_search_api_filter';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'search_api_index_test_index';
$view->human_name = 'test_range_search_api_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'] = 'search_api_index_test_index';
$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;
/* Sort criterion: Indexed Node: Entity ID */
$handler->display->display_options['sorts']['search_api_id']['id'] = 'search_api_id';
$handler->display->display_options['sorts']['search_api_id']['table'] = 'search_api_index_test_index';
$handler->display->display_options['sorts']['search_api_id']['field'] = 'search_api_id';
/* 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'] = 'search_api_index_test_index';
$handler->display->display_options['filters']['field_range_integer']['field'] = 'field_range_integer';
return $view;
}