diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTest.php index c274fff..62341ee 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTest.php @@ -59,18 +59,8 @@ function testSchemaMapping() { $expected = array(); $expected['label'] = 'Schema test data'; $expected['class'] = '\Drupal\Core\Config\Schema\Mapping'; - $expected['mapping']['testitem'] = array( - 'label' => 'Test item', - 'type' => 'string', - ); - $expected['mapping']['testlist'] = array( - 'label' => 'Test list', - 'type' => 'sequence' - ); - $expected['mapping']['testlist']['sequence'][] = array( - 'type' => 'string', - 'label' => 'Test', - ); + $expected['mapping']['testitem'] = array('label' => 'Test item'); + $expected['mapping']['testlist'] = array('label' => 'Test list'); $this->assertEqual($definition, $expected, 'Retrieved the right metadata for configuration with only some schema.'); // Check type detection on elements with undefined types. @@ -84,12 +74,8 @@ function testSchemaMapping() { $definition = $config['testlist']->getDefinition(); $expected = array(); $expected['label'] = 'Test list'; - $expected['class'] = '\Drupal\Core\Config\Schema\Sequence'; - $expected['type'] = 'sequence'; - $expected['sequence'][] = array( - 'type' => 'string', - 'label' => 'Test', - ); + $expected['class'] = '\Drupal\Core\Config\Schema\Property'; + $expected['type'] = 'undefined'; $this->assertEqual($definition, $expected, 'Automatic type fallback on non-string item worked.'); // Simple case, straight metadata. diff --git a/core/modules/config/lib/Drupal/config/Tests/DefaultConfigTest.php b/core/modules/config/lib/Drupal/config/Tests/DefaultConfigTest.php index 437c04e..c505bab 100644 --- a/core/modules/config/lib/Drupal/config/Tests/DefaultConfigTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/DefaultConfigTest.php @@ -62,9 +62,11 @@ public function testDefaultConfig() { if (strpos($config_name, 'migrate.migration') === 0 || strpos($config_name, 'language.config') === 0) { continue; } - // config_test.noschema has to be skipped as it tests + // 1. config_test.noschema has to be skipped as it tests // TypedConfigManagerInterface::hasConfigSchema() method. - if ($config_name == 'config_test.noschema') { + // 2. config.someschema has to be skipped as it tests + // schema default data type fallback. + if ($config_name == 'config_test.noschema' || $config_name == 'config_test.someschema') { continue; } diff --git a/core/modules/config/tests/config_test/config/schema/config_test.schema.yml b/core/modules/config/tests/config_test/config/schema/config_test.schema.yml index 98f3050..a5c89e1 100644 --- a/core/modules/config/tests/config_test/config/schema/config_test.schema.yml +++ b/core/modules/config/tests/config_test/config/schema/config_test.schema.yml @@ -5,14 +5,9 @@ config_test.someschema: label: 'Schema test data' mapping: testitem: - type: string label: 'Test item' testlist: - type: sequence label: 'Test list' - sequence: - - type: string - label: 'Test' config_test.someschema.with_parents: label: 'Schema test data with parenting'