function EntityViewsDataTest::assertViewsDataField

Same name in other branches
  1. 9 core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php \Drupal\Tests\views\Kernel\Entity\EntityViewsDataTest::assertViewsDataField()
  2. 11.x core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php \Drupal\Tests\views\Kernel\Entity\EntityViewsDataTest::assertViewsDataField()

Tests generic stuff per field.

@internal

Parameters

array $data: The views data to check.

string $field_name: The entity field name.

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

File

core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php, line 677

Class

EntityViewsDataTest
Tests entity views data.

Namespace

Drupal\Tests\views\Kernel\Entity

Code

protected function assertViewsDataField(array $data, string $field_name) : void {
    $this->assertEquals($field_name, $data['entity field']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.