You are here

public function SchemaListenerController::test in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/config/tests/config_test/src/SchemaListenerController.php \Drupal\config_test\SchemaListenerController::test()

Tests the WebTestBase 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 42
Contains \Drupal\config_test\SchemaListenerController.

Class

SchemaListenerController
Controller for testing \Drupal\Core\Config\Testing\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(),
    ];
  }
}