You are here

public function ViewsHandlerFilterNumericTest::testFilterNumericExposedGroupedNotEmpty in Views (for Drupal 7) 7.3

File

tests/handlers/views_handler_filter_numeric.test, line 320
Definition of ViewsHandlerFilterNumericTest.

Class

ViewsHandlerFilterNumericTest
Tests the numeric filter handler.

Code

public function testFilterNumericExposedGroupedNotEmpty() {
  $filters = $this
    ->getGroupedExposedFilters();
  $view = $this
    ->getBasicPageView();

  // Filter: Age, Operator: empty, Value.
  $filters['age']['group_info']['default_group'] = 5;
  $view
    ->set_display('page_1');
  $view->display['page_1']->handler
    ->override_option('filters', $filters);
  $this
    ->executeView($view);
  $resultset = array(
    array(
      'name' => 'John',
      'age' => 25,
    ),
    array(
      'name' => 'George',
      'age' => 27,
    ),
    array(
      'name' => 'Ringo',
      'age' => 28,
    ),
    array(
      'name' => 'Paul',
      'age' => 26,
    ),
    array(
      'name' => 'Meredith',
      'age' => 30,
    ),
  );
  $this
    ->assertIdenticalResultset($view, $resultset, $this->column_map);
}