function FieldInputValueNormalizerTraitTest::testKeyValueByDeltaUndefinedVariables

Tests key value by delta undefined variables.

@legacy-covers ::normalizeValue

File

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

Class

FieldInputValueNormalizerTraitTest
Tests Drupal\Core\Field\FieldInputValueNormalizerTrait.

Namespace

Drupal\Tests\Core\Field

Code

public function testKeyValueByDeltaUndefinedVariables() : void {
  $this->assertEquals([], $this->normalizeValue($undefined_variable, 'value'));
  $this->assertEquals([], $this->normalizeValue($undefined_variable['undefined_key'], 'value'));
}

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