You are here

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

Overrides ViewsExposedGroupsTestBase::setUp

File

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

Class

ViewsExposedGroupsInheritedPropertiesTest
Tests a view with exposed groups and autosubmit.

Namespace

Drupal\Tests\views_exposed_groups\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->defaultView
    ->getDisplay('default')
    ->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();
}