You are here

public function FieldResolverTest::resolveInternalIncludePathProvider in JSON:API 8

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

Provides test cases for resolveInternalEntityQueryPath.

File

tests/src/Kernel/Context/FieldResolverTest.php, line 88

Class

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

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