function UserAdminLanguageTest::setLanguageNegotiation in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/user/src/Tests/UserAdminLanguageTest.php \Drupal\user\Tests\UserAdminLanguageTest::setLanguageNegotiation()
Sets the User interface negotiation detection method.
Parameters
bool $admin_first: Whether the admin negotiation should be first.
Enables the "Account preference for administration pages" language detection method for the User interface language negotiation type.
4 calls to UserAdminLanguageTest::setLanguageNegotiation()
- UserAdminLanguageTest::testActualNegotiation in core/
modules/ user/ src/ Tests/ UserAdminLanguageTest.php - Tests the actual language negotiation.
- UserAdminLanguageTest::testUserAdminLanguageConfigurationAvailableIfAdminLanguageNegotiationIsEnabled in core/
modules/ user/ src/ Tests/ UserAdminLanguageTest.php - Tests that the admin language is configurable only for administrators.
- UserAdminLanguageTest::testUserAdminLanguageConfigurationAvailableWithAdminLanguageNegotiation in core/
modules/ user/ src/ Tests/ UserAdminLanguageTest.php - Tests that admin language negotiation is configurable only if enabled.
- UserAdminLanguageTest::testUserAdminLanguageConfigurationNotAvailableWithOnlyOneLanguage in core/
modules/ user/ src/ Tests/ UserAdminLanguageTest.php - Tests that admin language is not configurable in single language sites.
File
- core/
modules/ user/ src/ Tests/ UserAdminLanguageTest.php, line 163 - Contains \Drupal\user\Tests\UserAdminLanguageTest.
Class
- UserAdminLanguageTest
- Tests users' ability to change their own administration language.
Namespace
Drupal\user\TestsCode
function setLanguageNegotiation($admin_first = FALSE) {
$edit = array(
'language_interface[enabled][language-user-admin]' => TRUE,
'language_interface[enabled][language-url]' => TRUE,
'language_interface[weight][language-user-admin]' => $admin_first ? -12 : -8,
'language_interface[weight][language-url]' => -10,
);
$this
->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
}