You are here

public function EntityReferenceFieldNormalizerTest::denormalizeInvalidResourceProvider in JSON:API 8

Data provider for the denormalize test.

Return value

array The input data for the test method.

File

tests/src/Unit/Normalizer/EntityReferenceFieldNormalizerTest.php, line 167

Class

EntityReferenceFieldNormalizerTest
@coversDefaultClass \Drupal\jsonapi\Normalizer\EntityReferenceFieldNormalizer @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\Normalizer

Code

public function denormalizeInvalidResourceProvider() {
  return [
    [
      [
        'data' => [
          [
            'type' => 'invalid',
            'id' => '4e6cb61d-4f04-437f-99fe-42c002393658',
          ],
        ],
      ],
      'field_dummy',
    ],
    [
      [
        'data' => [
          'type' => 'lorem',
          'id' => '4e6cb61d-4f04-437f-99fe-42c002393658',
        ],
      ],
      'field_dummy',
    ],
    [
      [
        'data' => [
          [
            'type' => 'lorem',
            'id' => '4e6cb61d-4f04-437f-99fe-42c002393658',
          ],
        ],
      ],
      'field_dummy_single',
    ],
  ];
}