You are here

protected function EntityViewsDataTest::assertLongTextField in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Unit/EntityViewsDataTest.php \Drupal\Tests\views\Unit\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
Contains \Drupal\Tests\views\Unit\EntityViewsDataTest.

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