You are here

public function FieldResolverTest::resolveInternalIncludePathProvider in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php \Drupal\Tests\jsonapi\Kernel\Context\FieldResolverTest::resolveInternalIncludePathProvider()

Provides test cases for resolveInternalEntityQueryPath.

File

core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php, line 94

Class

FieldResolverTest
@coversDefaultClass \Drupal\jsonapi\Context\FieldResolver @group jsonapi

Namespace

Drupal\Tests\jsonapi\Kernel\Context

Code

public function resolveInternalIncludePathProvider() {
  return [
    'entity reference' => [
      [
        [
          'field_test_ref2',
        ],
      ],
      'field_test_ref2',
    ],
    'entity reference with multi target bundles' => [
      [
        [
          'field_test_ref1',
        ],
      ],
      'field_test_ref1',
    ],
    'entity reference then another entity reference' => [
      [
        [
          'field_test_ref1',
          'field_test_ref3',
        ],
      ],
      'field_test_ref1.field_test_ref3',
    ],
    'entity reference with multiple target bundles, each with different field, but the same public field name' => [
      [
        [
          'field_test_ref1',
          'field_test_alias_a',
        ],
        [
          'field_test_ref1',
          'field_test_alias_b',
        ],
      ],
      'field_test_ref1.field_test_alias',
    ],
  ];
}