function FilterTest::testInOperatorSelectAllOptions

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Functional/Plugin/FilterTest.php \Drupal\Tests\views\Functional\Plugin\FilterTest::testInOperatorSelectAllOptions()
  2. 8.9.x core/modules/views/tests/src/Functional/Plugin/FilterTest.php \Drupal\Tests\views\Functional\Plugin\FilterTest::testInOperatorSelectAllOptions()
  3. 10 core/modules/views/tests/src/Functional/Plugin/FilterTest.php \Drupal\Tests\views\Functional\Plugin\FilterTest::testInOperatorSelectAllOptions()

Tests an exposed filter when all options are selected.

File

core/modules/views/tests/src/Functional/Plugin/FilterTest.php, line 159

Class

FilterTest
Tests general filter plugin functionality.

Namespace

Drupal\Tests\views\Functional\Plugin

Code

public function testInOperatorSelectAllOptions() : void {
    $row['row[type]'] = 'fields';
    $this->drupalGet('admin/structure/views/nojs/display/test_filter_in_operator_ui/default/row');
    $this->submitForm($row, 'Apply');
    $field['name[node_field_data.nid]'] = TRUE;
    $this->drupalGet('admin/structure/views/nojs/add-handler/test_filter_in_operator_ui/default/field');
    $this->submitForm($field, 'Add and configure fields');
    $this->drupalGet('admin/structure/views/nojs/handler/test_filter_in_operator_ui/default/field/nid');
    $this->submitForm([], 'Apply');
    $edit['options[value][all]'] = TRUE;
    $edit['options[value][article]'] = TRUE;
    $edit['options[value][page]'] = TRUE;
    $this->drupalGet('admin/structure/views/nojs/handler/test_filter_in_operator_ui/default/filter/type');
    $this->submitForm($edit, 'Apply');
    $this->drupalGet('admin/structure/views/view/test_filter_in_operator_ui/edit/default');
    $this->submitForm([], 'Save');
    $this->submitForm([], 'Update preview');
    $this->assertSession()
        ->pageTextNotContains('The submitted value "page" in the Type element is not allowed.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.