function FieldInputValueNormalizerTraitTest::testKeyValueByDelta

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php \Drupal\Tests\Core\Field\FieldInputValueNormalizerTraitTest::testKeyValueByDelta()
  2. 10 core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php \Drupal\Tests\Core\Field\FieldInputValueNormalizerTraitTest::testKeyValueByDelta()
  3. 11.x core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php \Drupal\Tests\Core\Field\FieldInputValueNormalizerTraitTest::testKeyValueByDelta()

@dataProvider keyValueByDeltaTestCases @covers ::normalizeValue

File

core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php, line 20

Class

FieldInputValueNormalizerTraitTest
@coversDefaultClass \Drupal\Core\Field\FieldInputValueNormalizerTrait @group Field

Namespace

Drupal\Tests\Core\Field

Code

public function testKeyValueByDelta($input_value, $expected_value, $main_property_name = 'value') {
    $this->assertEquals($expected_value, $this->normalizeValue($input_value, $main_property_name));
}

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