diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigLocaleOverrideWebTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigLocaleOverrideWebTest.php index 9f9579d..0833653 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigLocaleOverrideWebTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigLocaleOverrideWebTest.php @@ -35,14 +35,22 @@ function testSiteNameTranslation() { $adminUser = $this->drupalCreateUser(array('administer site configuration', 'administer languages')); $this->drupalLogin($adminUser); - // Add French and make it the site default language. - $this->drupalPost('admin/config/regional/language/add', array('predefined_langcode' => 'fr'), t('Add language')); + // Add a custom lanugage. + $langcode = 'xx'; + $name = $this->randomName(16); + $edit = array( + 'predefined_langcode' => 'custom', + 'langcode' => $langcode, + 'name' => $name, + 'direction' => '0', + ); + $this->drupalPost('admin/config/regional/language/add', $edit, t('Add custom language')); $this->drupalLogout(); // The home page in English should not have the override. $this->drupalGet(''); - $this->assertNoText('French site name'); + $this->assertNoText('XX site name'); // During path resolution the system.site configuration object is used to // determine the front page. This occurs before language negotiation causing @@ -53,8 +61,8 @@ function testSiteNameTranslation() { // language negotiation. Ensure that it applies when we access the French // front page. // @see \Drupal\Core\PathProcessor::processInbound() - $this->drupalGet('fr'); - $this->assertText('French site name'); + $this->drupalGet('xx'); + $this->assertText('XX site name'); } } diff --git a/core/modules/config/tests/config_test/config/locale.config.fr.system.site.yml b/core/modules/config/tests/config_test/config/locale.config.fr.system.site.yml deleted file mode 100644 index 0e4081b..0000000 --- a/core/modules/config/tests/config_test/config/locale.config.fr.system.site.yml +++ /dev/null @@ -1 +0,0 @@ -name: 'French site name' diff --git a/core/modules/config/tests/config_test/config/locale.config.xx.system.site.yml b/core/modules/config/tests/config_test/config/locale.config.xx.system.site.yml new file mode 100644 index 0000000..4e3fc87 --- /dev/null +++ b/core/modules/config/tests/config_test/config/locale.config.xx.system.site.yml @@ -0,0 +1 @@ +name: 'XX site name'