You are here

public function RelatedResourceTypesTest::getRelatableResourceTypesProvider in JSON:API 8

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php \Drupal\Tests\jsonapi\Kernel\ResourceType\RelatedResourceTypesTest::getRelatableResourceTypesProvider()

@covers ::getRelatableResourceTypes @dataProvider getRelatableResourceTypesProvider

File

tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php, line 144

Class

RelatedResourceTypesTest
@coversDefaultClass \Drupal\jsonapi\ResourceType\ResourceType @coversClass \Drupal\jsonapi\ResourceType\ResourceTypeRepository @group jsonapi

Namespace

Drupal\Tests\jsonapi\Kernel\ResourceType

Code

public function getRelatableResourceTypesProvider() {
  return [
    [
      'node--foo',
      [
        'field_ref_foo' => [
          'node--foo',
        ],
        'field_ref_bar' => [
          'node--bar',
        ],
        'field_ref_any' => [
          'node--foo',
          'node--bar',
        ],
      ],
    ],
    [
      'node--bar',
      [],
    ],
  ];
}