You are here

protected function FilterEqualityTest::getGroupedExposedFilters in Views (for Drupal 7) 8.3

2 calls to FilterEqualityTest::getGroupedExposedFilters()
FilterEqualityTest::testEqualGroupedExposed in lib/Drupal/views/Tests/Handler/FilterEqualityTest.php
FilterEqualityTest::testEqualGroupedNotExposed in lib/Drupal/views/Tests/Handler/FilterEqualityTest.php

File

lib/Drupal/views/Tests/Handler/FilterEqualityTest.php, line 143
Definition of Drupal\views\Tests\Handler\FilterEqualityTest.

Class

FilterEqualityTest
Tests the core Drupal\views\Plugin\views\filter\Equality handler.

Namespace

Drupal\views\Tests\Handler

Code

protected function getGroupedExposedFilters() {
  $filters = array(
    'name' => array(
      'id' => 'name',
      'table' => 'views_test_data',
      'field' => 'name',
      'relationship' => 'none',
      'group' => 1,
      'exposed' => TRUE,
      'expose' => array(
        'operator' => 'name_op',
        'label' => 'name',
        'identifier' => 'name',
      ),
      'is_grouped' => TRUE,
      'group_info' => array(
        'label' => 'name',
        'identifier' => 'name',
        'default_group' => 'All',
        'group_items' => array(
          1 => array(
            'title' => 'Name is equal to Ringo',
            'operator' => '=',
            'value' => array(
              'value' => 'Ringo',
            ),
          ),
          2 => array(
            'title' => 'Name is not equal to Ringo',
            'operator' => '!=',
            'value' => array(
              'value' => 'Ringo',
            ),
          ),
        ),
      ),
    ),
  );
  return $filters;
}