You are here

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

File

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

Class

ViewsHandlerFilterNumericTest
Tests the numeric filter handler.

Code

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

  // Change the filtering.
  $view->display['default']->handler
    ->override_option('filters', array(
    'age' => array(
      'id' => 'age',
      'table' => 'views_test',
      'field' => 'age',
      'relationship' => 'none',
      'operator' => '=',
      'value' => array(
        'value' => 28,
      ),
    ),
  ));
  $this
    ->executeView($view);
  $resultset = array(
    array(
      'name' => 'Ringo',
      'age' => 28,
    ),
  );
  $this
    ->assertIdenticalResultset($view, $resultset, $this->column_map);
}