diff --git a/tests/src/Unit/PropExpressionTest.php b/tests/src/Unit/PropExpressionTest.php index b18b6c1c..acf77808 100644 --- a/tests/src/Unit/PropExpressionTest.php +++ b/tests/src/Unit/PropExpressionTest.php @@ -204,6 +204,28 @@ class PropExpressionTest extends UnitTestCase { ], ], + // Context: >1 bundle of entity type, bundle/configurable field. + // ⚠️ Note the inconsistent ordering in the object representation, and the + // consistent ordering based on alphabetical bundle ordering in the string + // representation. Also note that the same field name for two bundle + // and thus same property name for those two fields. + ['ℹ︎␜entity:node:article|news|product␝field_image|field_photo|field_photo␞␟alt|value|value', new FieldPropExpression(BetterEntityDataDefinition::create('node', ['news', 'article', 'product']), ['article' => 'field_image', 'news' => 'field_photo', 'product' => 'field_product_packaging_photo'], NULL, ['field_photo' => 'value', 'field_product_packaging_photo' => 'value']), + [ + 'module' => ['node', 'file', 'file', 'file'], + 'config' => [ + 'node.type.article', + 'node.type.news', + 'node.type.product', + 'field.field.node.article.field_image', + 'image.style.canvas_parametrized_width', + 'field.field.node.news.field_photo', + 'image.style.canvas_parametrized_width', + 'field.field.node.product.field_product_packaging_photo', + 'image.style.canvas_parametrized_width', + ], + ], + ], + // Structured data expressions do NOT introspect the data model, they are // just stand-alone expressions with a string representation and a PHP // object representation. Hence nonsensical values are accepted for all