@@ -81,8 +81,9 @@ public function testUserAdminLanguageConfigurationAvailableWithAdminLanguageNego
/**
* Tests that the admin language is configurable only for administrators.
*
* If a user has the permission "access administration pages", they should
* be able to see the setting to pick the language they want those pages in.
* If a user has the permission "access administration pages" or
* "view the administration theme", they should be able to see the setting to
* pick the language they want those pages in.
*
* If a user does not have that permission, it would confusing for them to
* have a setting for pages they cannot access, so they should not be able to
@@ -98,6 +99,13 @@ public function testUserAdminLanguageConfigurationAvailableIfAdminLanguageNegoti
// Ensure administration pages language setting is visible for admin.
$this->assertFieldByXPath($this->constructFieldXpath('id','edit-preferred-admin-langcode'),NULL,'Administration pages language selector available for admins.');
// Ensure administration pages language setting is visible for editors.
$editor=$this->drupalCreateUser(['view the administration theme']);
$this->drupalLogin($editor);
$path='user/'.$editor->id().'/edit';
$this->drupalGet($path);
$this->assertFieldByXPath($this->constructFieldXpath('id','edit-preferred-admin-langcode'),NULL,'Administration pages language selector available for editors.');
// Ensure administration pages language setting is hidden for non-admins.