protected function UserAgentTest::getMappings in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php \Drupal\Tests\Component\Utility\UserAgentTest::getMappings()
- 9 core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php \Drupal\Tests\Component\Utility\UserAgentTest::getMappings()
Helper method to supply language mappings to testGetBestMatchingLangcode().
Return value
array Language mappings.
1 call to UserAgentTest::getMappings()
- UserAgentTest::testGetBestMatchingLangcode in core/
tests/ Drupal/ Tests/ Component/ Utility/ UserAgentTest.php - Tests matching language from user agent.
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ UserAgentTest.php, line 52
Class
- UserAgentTest
- Tests bytes size parsing helper methods.
Namespace
Drupal\Tests\Component\UtilityCode
protected function getMappings() {
return [
'no' => 'nb',
'pt' => 'pt-pt',
'zh' => 'zh-hans',
'zh-tw' => 'zh-hant',
'zh-hk' => 'zh-hant',
'zh-mo' => 'zh-hant',
'zh-cht' => 'zh-hant',
'zh-cn' => 'zh-hans',
'zh-sg' => 'zh-hans',
'zh-chs' => 'zh-hans',
];
}