public function FieldResolverTest::resolveInternalIncludePathProvider in JSON:API 8.2
Same name and namespace in other branches
- 8 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 95
Class
- FieldResolverTest
- @coversDefaultClass \Drupal\jsonapi\Context\FieldResolver @group jsonapi @group legacy
Namespace
Drupal\Tests\jsonapi\Kernel\ContextCode
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',
],
];
}