diff --git a/core/modules/content_translation/src/Tests/ContentTranslationSettingsTest.php b/core/modules/content_translation/src/Tests/ContentTranslationSettingsTest.php index 152ad8e..aa6964d 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationSettingsTest.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationSettingsTest.php @@ -96,13 +96,24 @@ function testSettingsUI() { 'settings[comment][comment_article][settings][language][language_show]' => TRUE, 'settings[comment][comment_article][translatable]' => TRUE, 'settings[comment][comment_article][fields][comment_body]' => TRUE, + // Override both comment subject fields to none translatable. + 'settings[comment][comment_article][fields][subject]' => FALSE, + 'settings[comment][comment][fields][subject]' => FALSE, ); $this->assertSettings('comment', 'comment_article', TRUE, $edit); $definition = $this->entityManager()->getFieldDefinitions('comment', 'comment_article')['comment_body']; $this->assertTrue($definition->isTranslatable(), 'Article comment body is translatable.'); + $definition = $this->entityManager()->getFieldDefinitions('comment', 'comment_article')['subject']; + $this->assertFalse($definition->isTranslatable(), 'Article comment subject is not translatable.'); + $definition = $this->entityManager()->getFieldDefinitions('comment', 'comment')['comment_body']; $this->assertFalse($definition->isTranslatable(), 'Page comment body is not translatable.'); - $this->assertNull(content_translation_get_config('comment', 'comment_article', 'fields'), 'Configurable fields are not saved to content_translation.settings.'); + $definition = $this->entityManager()->getFieldDefinitions('comment', 'comment')['subject']; + $this->assertFalse($definition->isTranslatable(), 'Page comment subject is not translatable.'); + + $settings = content_translation_get_config('comment', 'comment_article', 'fields'); + $this->assertFalse(isset($settings['comment_body']), 'Configurable fields are not saved to content_translation.settings.'); + $this->assertTrue(isset($settings['subject']), 'Base fields are saved to content_translation.settings.'); // Test that translation can be enabled for base fields. $edit = array(