function UserAdminLanguageTest::testUserAdminLanguageConfigurationNotAvailableWithOnlyOneLanguage in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/user/src/Tests/UserAdminLanguageTest.php \Drupal\user\Tests\UserAdminLanguageTest::testUserAdminLanguageConfigurationNotAvailableWithOnlyOneLanguage()
Tests that admin language is not configurable in single language sites.
File
- core/
modules/ user/ src/ Tests/ UserAdminLanguageTest.php, line 52 - Contains \Drupal\user\Tests\UserAdminLanguageTest.
Class
- UserAdminLanguageTest
- Tests users' ability to change their own administration language.
Namespace
Drupal\user\TestsCode
function testUserAdminLanguageConfigurationNotAvailableWithOnlyOneLanguage() {
$this
->drupalLogin($this->adminUser);
$this
->setLanguageNegotiation();
$path = 'user/' . $this->adminUser
->id() . '/edit';
$this
->drupalGet($path);
// Ensure administration pages language settings widget is not available.
$this
->assertNoFieldByXPath($this
->constructFieldXpath('id', 'edit-preferred-admin-langcode'), NULL, 'Administration pages language selector not available.');
}