function HandlerTest::testFilterInOperatorUi

@todo This should probably moved to a filter related test.

File

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

Class

HandlerTest
Tests abstract handlers of views.

Namespace

Drupal\views\Tests\Handler

Code

function testFilterInOperatorUi() {
  $admin_user = $this
    ->drupalCreateUser(array(
    'administer views',
    'administer site configuration',
  ));
  $this
    ->drupalLogin($admin_user);
  menu_router_rebuild();
  $path = 'admin/structure/views/nojs/config-item/test_filter_in_operator_ui/default/filter/type';
  $this
    ->drupalGet($path);
  $this
    ->assertFieldByName('options[expose][reduce]', FALSE);
  $edit = array(
    'options[expose][reduce]' => TRUE,
  );
  $this
    ->drupalPost($path, $edit, t('Apply'));
  $this
    ->drupalGet($path);
  $this
    ->assertFieldByName('options[expose][reduce]', TRUE);
}