1 views_handler_filter_combine.test public ViewsHandlerFilterCombineTest::testFilterCombineContains()

File

core/modules/views/tests/handlers/views_handler_filter_combine.test, line 35
Definition of ViewsHandlerFilterCombineTest.

Class

ViewsHandlerFilterCombineTest
Tests the combine filter handler.

Code

public function testFilterCombineContains() {
  $view = $this->getBasicView();

  // Change the filtering.
  $view->display['default']->handler->override_option('filters', array(
    'age' => array(
      'id' => 'combine',
      'table' => 'views',
      'field' => 'combine',
      'relationship' => 'none',
      'operator' => 'contains',
      'fields' => array(
        'name',
        'job',
      ),
      'value' => 'ing',
    ),
  ));

  $this->executeView($view);
  $resultset = array(
    array(
      'name' => 'John',
      'job' => 'Singer',
    ),
    array(
      'name' => 'George',
      'job' => 'Singer',
    ),
    array(
      'name' => 'Ringo',
      'job' => 'Drummer',
    ),
    array(
      'name' => 'Ginger',
      'job' => NULL,
    ),
  );
  $this->assertIdenticalResultset($view, $resultset, $this->column_map);
}