function EntityViewsDataTest::assertEntityReferenceField

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

Tests views data for an entity reference field.

@internal

3 calls to EntityViewsDataTest::assertEntityReferenceField()
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 785

Class

EntityViewsDataTest
Tests entity views data.

Namespace

Drupal\Tests\views\Kernel\Entity

Code

protected function assertEntityReferenceField(array $data) : void {
    $this->assertEquals('field', $data['field']['id']);
    $this->assertEquals('numeric', $data['filter']['id']);
    $this->assertEquals('entity_target_id', $data['argument']['id']);
    $this->assertEquals('user', $data['argument']['target_entity_type_id']);
    $this->assertEquals('standard', $data['sort']['id']);
}

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