public function OnlyOneUnitTestTrait::getLanguageMap in Allow a content type only once (Only One) 8
Returns an array of language labels.
Return value
array An array of languages labels keyed by language code.
2 calls to OnlyOneUnitTestTrait::getLanguageMap()
- OnlyOneTest::getOnlyOneMock in tests/
src/ Unit/ OnlyOneTest.php - Mock some OnlyOne class functions.
- OnlyOneUnitTestTrait::getContentTypesObjectList in tests/
src/ Traits/ OnlyOneUnitTestTrait.php - Returns an array of content types objects.
File
- tests/
src/ Traits/ OnlyOneUnitTestTrait.php, line 206
Class
- OnlyOneUnitTestTrait
- Trait for common function to Unit tests.
Namespace
Drupal\Tests\onlyone\TraitsCode
public function getLanguageMap() {
// The language map.
$language_map = [
[
'en',
'En',
],
[
'es',
'Es',
],
[
'',
'Not specified',
],
[
'und',
'Not specified',
],
[
'xzz',
'Not applicable',
],
];
return $language_map;
}