testing – Problem with SchemaIncompleteException when running BrowserTestBase


I am trying to run a test, which extends BrowserTestBase, on my module. I got the following error:

  1. DrupalTestsmy_moduleFunctionalBasicTestCase::testMyModule
    DrupalCoreConfigSchemaSchemaIncompleteException: Schema errors for
    field.storage.node.field_tsc_language with the following errors:
    field.storage.node.field_tsc_language:settings.language_range missing schema, field.storage.node.field_tsc_language:settings.included_languages missing schema, field.storage.node.field_tsc_language:settings.excluded_languages missing schema, field.storage.node.field_tsc_language:settings.groups missing schema, field.storage.node.field_tsc_language:settings.maxlength missing schema, field.storage.node.field_tsc_language:settings.allowed_values_function missing schema

field.storage.node.field_tsc_language is a language field I have added to a content type. I don’t understand why it is asking me to create a schema, but anyway I have done it, creating the my_module.schema.yml file inside my_module/config/schema/.

field.storage.node.field_tsc_language
  type: config_object
  label: 'Langue de la société'
  mapping:
    settings:
      type: mapping
      label: 'Settings'
      mapping:
        language_range:
          type: integer
          label: 'Language range'
        included_languages:
          type: sequence
          label: 'Included language'
          sequence:
            type: string
            label: 'Language code'
        excluded_languages:
          type: sequence
          label: 'Excluded language'
          sequence:
            type: string
            label: 'Language code'
        groups:
          type: string
          label: 'Groups'
        maxlength:
          type: integer
          label: 'Max length'
        allowed_values_function:
          type: string
          label: 'Function name'

I have tried other schemas, but in all the cases I get the same error.

I have created this schema based on the following field.storage.node.field_tsc_language.yml file.

uuid: 59d14613-4a21-4d99-88b9-8adad83ca7f7
langcode: en
status: true
dependencies:
  module:
    - languagefield
    - node
id: node.field_tsc_language
field_name: field_tsc_language
entity_type: node
type: language_field
settings:
  language_range:
    1: '1'
    11: 0
    12: 0
    2: 0
    site_default: 0
    und: 0
    current_interface: 0
    authors_default: 0
  included_languages: {  }
  excluded_languages: {  }
  groups: ''
  maxlength: 12
  allowed_values_function: languagefield_allowed_values
module: languagefield
locked: false
cardinality: 1
translatable: true
indexes: {  }
persist_with_no_fields: false
custom_storage: false