function ResourceTypeRepositoryTest::getFieldsProvider

Same name and namespace in other branches
  1. 10 core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php \Drupal\Tests\jsonapi\Kernel\ResourceType\ResourceTypeRepositoryTest::getFieldsProvider()
  2. 11.x core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php \Drupal\Tests\jsonapi\Kernel\ResourceType\ResourceTypeRepositoryTest::getFieldsProvider()

Data provider for testMappingNameConflictCheck.

These field name lists are designed to trigger a naming conflict in the mapping: the special-cased names "type" or "id", and the name "{$entity_type_id}_type" or "{$entity_type_id}_id", respectively.

@returns array The data for the test method.

File

core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php, line 144

Class

ResourceTypeRepositoryTest
@coversDefaultClass \Drupal\jsonapi\ResourceType\ResourceTypeRepository[[api-linebreak]] @group jsonapi

Namespace

Drupal\Tests\jsonapi\Kernel\ResourceType

Code

public function getFieldsProvider() {
  return [
    [
      [
        'type',
        'node_type',
      ],
    ],
    [
      [
        'id',
        'node_id',
      ],
    ],
  ];
}

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