You are here

protected function EntityViewsDataTest::assertLongTextField in Drupal 10

Tests views data for a long text field.

@internal

Parameters

array $data: The views data for the table this field is in.

string $field_name: The name of the field being checked.

3 calls to EntityViewsDataTest::assertLongTextField()
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 716

Class

EntityViewsDataTest
Tests entity views data.

Namespace

Drupal\Tests\views\Kernel\Entity

Code

protected function assertLongTextField(array $data, string $field_name) : void {
  $value_field = $data[$field_name . '__value'];
  $this
    ->assertEquals('field', $value_field['field']['id']);
  $this
    ->assertEquals($field_name . '__format', $value_field['field']['format']);
  $this
    ->assertEquals('string', $value_field['filter']['id']);
  $this
    ->assertEquals('string', $value_field['argument']['id']);
  $this
    ->assertEquals('standard', $value_field['sort']['id']);
  $this
    ->assertStringField($data[$field_name . '__format']);
}