diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php index 6ad570a..a4811b5 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php @@ -144,6 +144,31 @@ function testConfigTranslation() { // Ensure that the translated configuration has been removed. $this->assertFalse(\Drupal::config('locale.config.xx.image.style.medium')->get('label'), 'Translated configuration for image module removed.'); + + // Enable the contact module. + $this->drupalPostForm('admin/modules', array('modules[Core][contact][enable]' => "1"), t('Save configuration')); + $this->resetAll(); + + // Translate default category using the UI so configuration is refreshed. + $category_label = $this->randomName(20); + $search = array( + 'string' => 'Website feedback', + 'langcode' => $langcode, + 'translation' => 'all', + ); + $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter')); + $textarea = current($this->xpath('//textarea')); + $lid = (string) $textarea[0]['name']; + $edit = array( + $lid => $category_label, + ); + $this->drupalPostForm('admin/config/regional/translate', $edit, t('Save translations')); + + // Check if this category displayed in this language will use the + // translation. This test ensures the entity loaded from the request + // upcasting will already work. + $this->drupalGet($langcode . '/contact/feedback'); + $this->assertTest($categry_label); } }