function ModuleTest::assertInstanceHandler

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

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

File

drupal/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php, line 221
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());
}