public function EntityReferenceFieldNormalizerTest::denormalizeProvider in JSON:API 8
Data provider for the denormalize test.
Return value
array The data for the test method.
File
- tests/
src/ Unit/ Normalizer/ EntityReferenceFieldNormalizerTest.php, line 127
Class
- EntityReferenceFieldNormalizerTest
- @coversDefaultClass \Drupal\jsonapi\Normalizer\EntityReferenceFieldNormalizer @group jsonapi
Namespace
Drupal\Tests\jsonapi\Unit\NormalizerCode
public function denormalizeProvider() {
return [
[
[
'data' => [
[
'type' => 'lorem--dummy_bundle',
'id' => '4e6cb61d-4f04-437f-99fe-42c002393658',
],
],
],
'field_dummy',
[
[
'bunny' => 42,
],
],
],
[
[
'data' => [],
],
'field_dummy',
[],
],
[
[
'data' => NULL,
],
'field_dummy_single',
[],
],
];
}