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. 10 core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php \Drupal\Tests\views\Kernel\Entity\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.

Parameters

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

$field_name: The name of the field being checked.

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

File

core/modules/views/tests/src/Unit/EntityViewsDataTest.php, line 1079

Class

EntityViewsDataTest
@coversDefaultClass \Drupal\views\EntityViewsData @group Views

Namespace

Drupal\Tests\views\Unit

Code

protected function assertLongTextField($data, $field_name) {
    $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.