function ResourceIdentifierNormalizerTest::denormalizeInvalidResourceProvider

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php \Drupal\Tests\jsonapi\Unit\Normalizer\ResourceIdentifierNormalizerTest::denormalizeInvalidResourceProvider()
  2. 8.9.x core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php \Drupal\Tests\jsonapi\Unit\Normalizer\ResourceIdentifierNormalizerTest::denormalizeInvalidResourceProvider()
  3. 11.x core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php \Drupal\Tests\jsonapi\Unit\Normalizer\ResourceIdentifierNormalizerTest::denormalizeInvalidResourceProvider()

Data provider for the denormalize test.

Return value

array The input data for the test method.

File

core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php, line 171

Class

ResourceIdentifierNormalizerTest
@coversDefaultClass \Drupal\jsonapi\Normalizer\ResourceIdentifierNormalizer @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\Normalizer

Code

public static 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',
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.