function FieldNormalizerDenormalizeExceptionsTest::testFieldNormalizerDenormalizeExceptions
Tests that the FieldNormalizer::denormalize() throws proper exceptions.
@covers \Drupal\hal\Normalizer\FieldNormalizer
@dataProvider providerNormalizerDenormalizeExceptions
File
-
core/
modules/ hal/ tests/ src/ Unit/ FieldNormalizerDenormalizeExceptionsTest.php, line 25
Class
- FieldNormalizerDenormalizeExceptionsTest
- Tests the exceptions thrown by FieldNormalizer and FieldItemNormalizer.
Namespace
Drupal\Tests\hal\UnitCode
public function testFieldNormalizerDenormalizeExceptions($context) {
$field_item_normalizer = new FieldNormalizer();
$data = [];
$class = [];
$this->expectException(InvalidArgumentException::class);
$field_item_normalizer->denormalize($data, $class, NULL, $context);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.