function FieldInputValueNormalizerTraitTest::testScalarWithNoMainProperty
Tests scalar with no main property.
@legacy-covers ::normalizeValue
File
-
core/
tests/ Drupal/ Tests/ Core/ Field/ FieldInputValueNormalizerTraitTest.php, line 96
Class
Namespace
Drupal\Tests\Core\FieldCode
public function testScalarWithNoMainProperty() : void {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('A main property is required when normalizing scalar field values.');
$value = 'foo';
$this->normalizeValue($value, NULL);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.