public function OnlyOneTest::providerGetLanguageLabel in Allow a content type only once (Only One) 8
Data provider for testGetLanguageLabel().
Return value
array An array of arrays, each containing:
- 'expected' - Expected return from getLanguageLabel().
- 'language_code' - The language code.
See also
testGetLanguageLabel()
File
- tests/
src/ Unit/ OnlyOneTest.php, line 434
Class
- OnlyOneTest
- Tests the OnlyOne class methods.
Namespace
Drupal\Tests\onlyone\UnitCode
public function providerGetLanguageLabel() {
$tests['und langcode'] = [
'Not specified',
LanguageInterface::LANGCODE_NOT_SPECIFIED,
];
$tests['zxx langcode'] = [
'Not applicable',
LanguageInterface::LANGCODE_NOT_APPLICABLE,
];
$tests['es langcode'] = [
'Es',
'es',
];
$tests['en langcode'] = [
'En',
'en',
];
return $tests;
}