You are here

function ModuleTest::assertInstanceHandler in Views (for Drupal 7) 8.3

Ensure that a certain handler is a instance of a certain table/field.

1 call to ModuleTest::assertInstanceHandler()
ModuleTest::testviews_get_handler in lib/Drupal/views/Tests/ModuleTest.php
Tests the views_get_handler method.

File

lib/Drupal/views/Tests/ModuleTest.php, line 220
Definition of Drupal\views\Tests\ModuleTest.

Class

ModuleTest
Tests basic functions from the Views module.

Namespace

Drupal\views\Tests

Code

function assertInstanceHandler($handler, $table, $field, $id) {
  $table_data = views_fetch_data($table);
  $field_data = $table_data[$field][$id];
  $this
    ->assertEqual($field_data['id'], $handler
    ->getPluginId());
}