function EntityViewsDataTest::assertLanguageField

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

Tests views data for a language field.

@internal

Parameters

array $data: The views data to check.

3 calls to EntityViewsDataTest::assertLanguageField()
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 773

Class

EntityViewsDataTest
Tests entity views data.

Namespace

Drupal\Tests\views\Kernel\Entity

Code

protected function assertLanguageField(array $data) : void {
    $this->assertEquals('field_language', $data['field']['id']);
    $this->assertEquals('language', $data['filter']['id']);
    $this->assertEquals('language', $data['argument']['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.