You are here

protected function EntityViewsDataTest::assertField in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/tests/src/Unit/EntityViewsDataTest.php \Drupal\Tests\views\Unit\EntityViewsDataTest::assertField()

Tests generic stuff per field.

Parameters

array $data: The views data to check.

string $field_name: The entity field name.

3 calls to EntityViewsDataTest::assertField()
EntityViewsDataTest::testBaseTableFields in core/modules/views/tests/src/Unit/EntityViewsDataTest.php
Tests fields on the base table.
EntityViewsDataTest::testDataTableFields in core/modules/views/tests/src/Unit/EntityViewsDataTest.php
Tests fields on the data table.
EntityViewsDataTest::testRevisionTableFields in core/modules/views/tests/src/Unit/EntityViewsDataTest.php
Tests fields on the revision table.

File

core/modules/views/tests/src/Unit/EntityViewsDataTest.php, line 766
Contains \Drupal\Tests\views\Unit\EntityViewsDataTest.

Class

EntityViewsDataTest
@coversDefaultClass \Drupal\views\EntityViewsData @group Views

Namespace

Drupal\Tests\views\Unit

Code

protected function assertField($data, $field_name) {
  $this
    ->assertEquals($field_name, $data['entity field']);
}