You are here

public function FieldValueTest::providerTestFieldLabel in Twig Field Value 2.0.x

Same name and namespace in other branches
  1. 8 tests/src/Unit/FieldValue/FieldValueTest.php \Drupal\Tests\twig_field_value\Unit\FieldValue\FieldValueTest::providerTestFieldLabel()

Provides data and expected results for the test method.

Return value

array Data and expected results.

File

tests/src/Unit/FieldValue/FieldValueTest.php, line 48

Class

FieldValueTest
@coversDefaultClass \Drupal\twig_field_value\Twig\Extension\FieldValueExtension @group twig_field_value

Namespace

Drupal\Tests\twig_field_value\Unit\FieldValue

Code

public function providerTestFieldLabel() {
  return [
    [
      NULL,
      [],
    ],
    [
      NULL,
      [
        '#title' => 'foo',
      ],
    ],
    [
      NULL,
      [
        '#theme' => 'item_list',
      ],
    ],
    [
      NULL,
      [
        '#theme' => 'field',
      ],
    ],
    [
      'My title',
      [
        '#theme' => 'field',
        '#title' => 'My title',
      ],
    ],
  ];
}