You are here

public function FieldValueTest::testFieldLabel in Twig Field Value 8

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

Asserts the twig field_label filter.

@dataProvider providerTestFieldLabel @covers ::getFieldLabel

Parameters

$expected_result:

$render_array:

File

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

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 testFieldLabel($expected_result, $render_array) {
  $result = $this->extension
    ->getFieldLabel($render_array);
  $this
    ->assertSame($expected_result, $result);
}