You are here

protected function ViewsExposedGroupsExposedOperatorTest::setUp in Views exposed groups 3.0.x

Overrides ViewsExposedGroupsTestBase::setUp

File

tests/src/Functional/ViewsExposedGroupsExposedOperatorTest.php, line 15

Class

ViewsExposedGroupsExposedOperatorTest
Tests a view with exposed groups that also has exposed operators.

Namespace

Drupal\Tests\views_exposed_groups\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->defaultView
    ->getDisplay('default')
    ->setOption('filters.title.expose.use_operator', TRUE)
    ->setOption('exposed_form', [
    'type' => 'views_exposed_groups',
    'options' => [
      'views_exposed_groups' => [
        'groups' => "Default\nAdvanced",
        'format_groups' => 'fieldsets',
        'vertical_tabs_summary' => '0',
        'group-title' => [
          'group' => '0',
          'filter_name' => 'title',
          'weight' => '-4',
        ],
        'group-nid' => [
          'group' => '1',
          'filter_name' => 'nid',
          'weight' => '-3',
        ],
        'group-uid' => [
          'group' => 'no-group',
          'filter_name' => 'uid',
          'weight' => '0',
        ],
      ],
    ],
  ]);
  $this->defaultView
    ->save();
}