diff --git a/core/modules/content_translation/src/Tests/ContentTranslationSettingsTest.php b/core/modules/content_translation/src/Tests/ContentTranslationSettingsTest.php index 98ea255..5ca67ab 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationSettingsTest.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationSettingsTest.php @@ -8,6 +8,7 @@ namespace Drupal\content_translation\Tests; use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; +use Drupal\config\Tests\SchemaCheckTestTrait; use Drupal\Core\Field\Entity\BaseFieldOverride; use Drupal\Core\Language\Language; use Drupal\field\Entity\FieldConfig; @@ -20,6 +21,8 @@ */ class ContentTranslationSettingsTest extends WebTestBase { + use SchemaCheckTestTrait; + /** * Modules to enable. * @@ -178,6 +181,8 @@ function testSettingsUI() { $this->assertEqual($definitions['body']->isTranslatable(), $translatable, 'Field translatability correctly switched.'); $this->assertEqual($field->isTranslatable(), $definitions['body']->isTranslatable(), 'Configurable field translatability correctly switched.'); } + + $this->assertAllConfigSchema(); } /** @@ -269,4 +274,18 @@ protected function entityManager() { return $this->container->get('entity.manager'); } + /** + * Asserts all active configuration matches schemas. + */ + protected function assertAllConfigSchema() { + $names = $this->container->get('config.storage')->listAll(); + $factory = $this->container->get('config.factory'); + /** @var \Drupal\Core\Config\TypedConfigManagerInterface $typed_config */ + $typed_config = $this->container->get('config.typed'); + foreach ($names as $name) { + $config = $factory->get($name); + $this->assertConfigSchema($typed_config, $name, $config->get()); + } + } + }