diff --git a/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml b/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml index ce894c2..fcf4048 100644 --- a/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml +++ b/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml @@ -335,3 +335,17 @@ config_schema_test.schema_sequence_sort: type: string bar: type: string + +config_schema_test.simple_mapping: + type: mapping + mapping: + base_sequence_item: + type: string + +config_schema_test.schema_sequence_merged_mapping: + type: sequence + sequence: + type: config_schema_test.simple_mapping + mapping: + sub_sequence_item: + type: string diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php index fb3573e..d391845 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php @@ -411,6 +411,23 @@ public function testConfigSaveWithSchema() { } /** + * Test config sequence with merged mapping. + */ + public function testConfigSequenceWithMergedMapping() { + $data = [ + [ + 'base_sequence_item' => 'foo', + 'sub_sequence_item' => 'bar', + ], + ]; + $this->config('config_schema_test.schema_sequence_merged_mapping') + ->setData($data) + ->save(); + + $this->assertEquals($data, $this->config('config_schema_test.schema_sequence_sort')->get()); + } + + /** * Tests configuration sequence sorting using schemas. */ public function testConfigSaveWithSequenceSorting() {