function EntityViewsDataTest::assertLongTextField

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

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 722

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']);
}

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