protected function FilterNumericTest::getGroupedExposedFilters

5 calls to FilterNumericTest::getGroupedExposedFilters()
FilterNumericTest::testFilterNumericExposedGroupedBetween in drupal/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php
FilterNumericTest::testFilterNumericExposedGroupedEmpty in drupal/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php
FilterNumericTest::testFilterNumericExposedGroupedNotBetween in drupal/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php
FilterNumericTest::testFilterNumericExposedGroupedNotEmpty in drupal/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php
FilterNumericTest::testFilterNumericExposedGroupedSimple in drupal/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php

File

drupal/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php, line 369
Definition of Drupal\views\Tests\Handler\FilterNumericTest.

Class

FilterNumericTest
Tests the numeric filter handler.

Namespace

Drupal\views\Tests\Handler

Code

protected function getGroupedExposedFilters() {
  $filters = array(
    'age' => array(
      'id' => 'age',
      'table' => 'views_test_data',
      'field' => 'age',
      'relationship' => 'none',
      'exposed' => TRUE,
      'expose' => array(
        'operator' => 'age_op',
        'label' => 'age',
        'identifier' => 'age',
      ),
      'is_grouped' => TRUE,
      'group_info' => array(
        'label' => 'age',
        'identifier' => 'age',
        'default_group' => 'All',
        'group_items' => array(
          1 => array(
            'title' => 'Age is 28',
            'operator' => '=',
            'value' => array(
              'value' => 28,
            ),
          ),
          2 => array(
            'title' => 'Age is between 26 and 29',
            'operator' => 'between',
            'value' => array(
              'min' => 26,
              'max' => 29,
            ),
          ),
          3 => array(
            'title' => 'Age is not between 26 and 29',
            'operator' => 'not between',
            'value' => array(
              'min' => 26,
              'max' => 29,
            ),
          ),
          4 => array(
            'title' => 'Age is empty',
            'operator' => 'empty',
          ),
          5 => array(
            'title' => 'Age is not empty',
            'operator' => 'not empty',
          ),
        ),
      ),
    ),
  );
  return $filters;
}