public function FieldNormalizerDenormalizeExceptionsUnitTest::testFieldNormalizerDenormalizeExceptions in Drupal 8
Tests that the FieldNormalizer::denormalize() throws proper exceptions.
@dataProvider providerNormalizerDenormalizeExceptions
Parameters
array $context: Context for FieldNormalizer::denormalize().
File
- core/
modules/ hal/ tests/ src/ Unit/ FieldNormalizerDenormalizeExceptionsUnitTest.php, line 22
Class
- FieldNormalizerDenormalizeExceptionsUnitTest
- @coversDefaultClass \Drupal\hal\Normalizer\FieldNormalizer @group hal
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);
}