function FieldResolverTest::resolveInternalIncludePathProvider

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php \Drupal\Tests\jsonapi\Kernel\Context\FieldResolverTest::resolveInternalIncludePathProvider()
  2. 10 core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php \Drupal\Tests\jsonapi\Kernel\Context\FieldResolverTest::resolveInternalIncludePathProvider()
  3. 11.x 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',
        ],
    ];
}

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