diff --git a/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php b/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php index 62fb3befa0..1e58b82b3b 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php @@ -285,40 +285,34 @@ public function resolveInternalEntityQueryPathErrorProvider() { ], 'message correctly identifies missing field' => [ 'entity_test_with_bundle', 'bundle1', - 'field_test_ref1.entity:entity_test_with_bundle.field_test1', - 'Invalid nested filtering. The field `field_test1`, given in the path `field_test_ref1.entity:entity_test_with_bundle.field_test1`, does not exist.', + 'field_test1.value', + 'Invalid nested filtering. The property `value`, given in the path `field_test1.value`, does not exist. Filter by `field_test1`, not `field_test1.value` (the JSON:API module elides property names from single-property fields).', ], - 'message correctly identifies different missing field' => [ + 'single-property field then delta 0 with property specifier `value`' => [ 'entity_test_with_bundle', 'bundle1', - 'field_test_ref1.entity:entity_test_with_bundle.field_test2', - 'Invalid nested filtering. The field `field_test2`, given in the path `field_test_ref1.entity:entity_test_with_bundle.field_test2`, does not exist.', + 'field_test1.0.value', + 'Invalid nested filtering. The property `value`, given in the path `field_test1.0.value`, does not exist. Filter by `field_test1.0`, not `field_test1.0.value` (the JSON:API module elides property names from single-property fields).', ], - 'message correctly identifies missing entity reference field' => [ - 'entity_test_with_bundle', 'bundle2', - 'field_test_ref1.entity:entity_test_with_bundle.field_test2', - 'Invalid nested filtering. The field `field_test_ref1`, given in the path `field_test_ref1.entity:entity_test_with_bundle.field_test2`, does not exist.', - ], - - 'entity reference then a complex field with no property specifier' => [ + 'single-property field then delta 1 with property specifier `value`' => [ 'entity_test_with_bundle', 'bundle1', - 'field_test_ref2.field_test_text', - 'Invalid nested filtering. The field `field_test_text`, given in the path `field_test_ref2.field_test_text` is incomplete, it must end with one of the following specifiers: `value`, `format`, `processed`.', + 'field_test1.1.value', + 'Invalid nested filtering. The property `value`, given in the path `field_test1.1.value`, does not exist. Filter by `field_test1.1`, not `field_test1.1.value` (the JSON:API module elides property names from single-property fields).', ], - 'entity reference then no delta with property specifier `target_id`' => [ + 'entity reference then no delta with property specifier `drupal_internal__target_id`' => [ 'entity_test_with_bundle', 'bundle1', - 'field_test_ref1.target_id', - 'Invalid nested filtering. The property `target_id`, given in the path `field_test_ref1.target_id`, does not exist. Filter by `field_test_ref1`, not `field_test_ref1.target_id` (the JSON:API module elides property names from single-property fields).', + 'field_test_ref1.drupal_internal__target_id', + 'Invalid nested filtering. The property `drupal_internal__target_id`, given in the path `field_test_ref1.drupal_internal__target_id` belongs to the meta object of a relationship and must be preceded by `meta`.', ], - 'entity reference then delta 0 with property specifier `target_id`' => [ + 'entity reference then delta 0 with property specifier `drupal_internal__target_id`' => [ 'entity_test_with_bundle', 'bundle1', - 'field_test_ref1.0.target_id', - 'Invalid nested filtering. The property `target_id`, given in the path `field_test_ref1.0.target_id`, does not exist. Filter by `field_test_ref1.0`, not `field_test_ref1.0.target_id` (the JSON:API module elides property names from single-property fields).', + 'field_test_ref1.0.drupal_internal__target_id', + 'Invalid nested filtering. The property `drupal_internal__target_id`, given in the path `field_test_ref1.0.drupal_internal__target_id` belongs to the meta object of a relationship and must be preceded by `meta`.', ], - 'entity reference then delta 1 with property specifier `target_id`' => [ + 'entity reference then delta 1 with property specifier `drupal_internal__target_id`' => [ 'entity_test_with_bundle', 'bundle1', - 'field_test_ref1.1.target_id', - 'Invalid nested filtering. The property `target_id`, given in the path `field_test_ref1.1.target_id`, does not exist. Filter by `field_test_ref1.1`, not `field_test_ref1.1.target_id` (the JSON:API module elides property names from single-property fields).', + 'field_test_ref1.1.drupal_internal__target_id', + 'Invalid nested filtering. The property `drupal_internal__target_id`, given in the path `field_test_ref1.1.drupal_internal__target_id` belongs to the meta object of a relationship and must be preceded by `meta`.', ], 'entity reference then no reference property then a complex field' => [