function SchemaListenerController::test

Tests the BrowserTestBase tests can use strict schema checking.

1 string reference to 'SchemaListenerController::test'
config_test.routing.yml in core/modules/config/tests/config_test/config_test.routing.yml
core/modules/config/tests/config_test/config_test.routing.yml

File

core/modules/config/tests/config_test/src/SchemaListenerController.php, line 39

Class

SchemaListenerController
Controller for testing \Drupal\Core\Config\Development\ConfigSchemaChecker.

Namespace

Drupal\config_test

Code

public function test() {
  try {
    $this->configFactory
      ->getEditable('config_schema_test.schemaless')
      ->set('foo', 'bar')
      ->save();
  } catch (SchemaIncompleteException $e) {
    return [
      '#markup' => $e->getMessage(),
    ];
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.