diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTestBase.php b/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTestBase.php index 7a43f0a..b31551a 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTestBase.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTestBase.php @@ -46,17 +46,6 @@ protected $configPass; /** - * {@inheritdoc} - */ - public static function getInfo() { - return array( - 'name' => 'Default configuration', - 'description' => 'Tests that default configuration provided by all modules matches schema.', - 'group' => 'Configuration', - ); - } - - /** * Asserts the TypedConfigManager has a valid schema for the configuration. * * @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config @@ -95,47 +84,42 @@ public function assertConfigSchema(TypedConfigManagerInterface $typed_config, $c * Returns mixed value. */ protected function checkValue($key, $value) { + + try { + $element = $this->schema->get($key); + } + catch (SchemaIncompleteException $e) { + $this->fail("{$this->configName}:$key has no schema."); + } if (is_scalar($value) || $value === NULL) { - try { - $success = FALSE; - $type = gettype($value); - $element = $this->schema->get($key); - if ($element instanceof PrimitiveInterface) { - if ($type == 'integer' && $element instanceof IntegerInterface) { - $success = TRUE; - } - if ($type == 'double' && $element instanceof FloatInterface) { - $success = TRUE; - } - if ($type == 'boolean' && $element instanceof BooleanInterface) { - $success = TRUE; - } - if ($type == 'string' && ($element instanceof StringInterface || $element instanceof Property)) { - $success = TRUE; - } - // Null values are allowed for all scalar types. - if ($value === NULL) { - $success = TRUE; - } + $success = FALSE; + $type = gettype($value); + if ($element instanceof PrimitiveInterface) { + if ($type == 'integer' && $element instanceof IntegerInterface) { + $success = TRUE; + } + if ($type == 'double' && $element instanceof FloatInterface) { + $success = TRUE; + } + if ($type == 'boolean' && $element instanceof BooleanInterface) { + $success = TRUE; } - if (!$success) { - $class = get_class($element); - $this->fail("{$this->configName}:$key has the wrong schema. Variable type is $type and schema class is $class."); + if ($type == 'string' && ($element instanceof StringInterface || $element instanceof Property)) { + $success = TRUE; + } + // Null values are allowed for all scalar types. + if ($value === NULL) { + $success = TRUE; } } - catch (SchemaIncompleteException $e) { - $this->fail("{$this->configName}:$key has no schema."); + if (!$success) { + $class = get_class($element); + $this->fail("{$this->configName}:$key has the wrong schema. Variable type is $type and schema class is $class."); } } else { - try { - $element = $this->schema->get($key); - if (!$element instanceof ArrayElement) { - $this->fail("Non-scalar {$this->configName}:$key is not defined as an array type (such as mapping or sequence)."); - } - } - catch (SchemaIncompleteException $e) { - $this->fail("{$this->configName}:$key has no schema."); + if (!$element instanceof ArrayElement) { + $this->fail("Non-scalar {$this->configName}:$key is not defined as an array type (such as mapping or sequence)."); } // Go on processing so we can get errors on all levels. Any non-scalar diff --git a/core/modules/views/config/schema/views.argument_validator.schema.yml b/core/modules/views/config/schema/views.argument_validator.schema.yml index ba0f894..6e3cb44 100644 --- a/core/modules/views/config/schema/views.argument_validator.schema.yml +++ b/core/modules/views/config/schema/views.argument_validator.schema.yml @@ -25,8 +25,8 @@ views.argument_validator_entity: type: sequence label: 'Bundles' sequence: - label: 'Bundle' - type: string + - type: string + label: 'Bundle' access: type: boolean label: 'Access' diff --git a/core/modules/views/config/schema/views.cache.schema.yml b/core/modules/views/config/schema/views.cache.schema.yml index cbeb556..3e90332 100644 --- a/core/modules/views/config/schema/views.cache.schema.yml +++ b/core/modules/views/config/schema/views.cache.schema.yml @@ -1,16 +1,5 @@ # Schema for the views cache. -views_cache: - type: mapping - label: 'Cache configuration' - mapping: - type: - type: string - label: 'Cache type' - provider: - type: string - label: 'Provider' - views.cache.none: type: views_cache label: 'No caching' diff --git a/core/modules/views/config/schema/views.data_types.schema.yml b/core/modules/views/config/schema/views.data_types.schema.yml index ca374df..9e8e12f 100644 --- a/core/modules/views/config/schema/views.data_types.schema.yml +++ b/core/modules/views/config/schema/views.data_types.schema.yml @@ -846,3 +846,14 @@ views_entity_row: view_mode: type: string label: 'View mode' + +views_cache: + type: mapping + label: 'Cache configuration' + mapping: + type: + type: string + label: 'Cache type' + provider: + type: string + label: 'Provider'