You are here

function ModuleTest::assertInstanceHandler in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/ModuleTest.php \Drupal\views\Tests\ModuleTest::assertInstanceHandler()

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

1 call to ModuleTest::assertInstanceHandler()
ModuleTest::testViewsGetHandler in core/modules/views/src/Tests/ModuleTest.php
Tests the views_get_handler method.

File

core/modules/views/src/Tests/ModuleTest.php, line 361
Contains \Drupal\views\Tests\ModuleTest.

Class

ModuleTest

Namespace

Drupal\views\Tests

Code

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