You are here

public function FilterNumericTest::testFilterNumericSimple in Views (for Drupal 7) 8.3

File

lib/Drupal/views/Tests/Handler/FilterNumericTest.php, line 44
Definition of Drupal\views\Tests\Handler\FilterNumericTest.

Class

FilterNumericTest
Tests the numeric filter handler.

Namespace

Drupal\views\Tests\Handler

Code

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

  // Change the filtering
  $view->displayHandlers['default']
    ->overrideOption('filters', array(
    'age' => array(
      'id' => 'age',
      'table' => 'views_test_data',
      '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);
}