function LanguageTest::provider
Same name in this branch
- 9 core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php \Drupal\Tests\ckeditor5\FunctionalJavascript\LanguageTest::provider()
Same name in other branches
- 10 core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php \Drupal\Tests\ckeditor5\FunctionalJavascript\LanguageTest::provider()
- 10 core/modules/ckeditor5/tests/src/Kernel/LanguageTest.php \Drupal\Tests\ckeditor5\Kernel\LanguageTest::provider()
- 11.x core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php \Drupal\Tests\ckeditor5\FunctionalJavascript\LanguageTest::provider()
- 11.x core/modules/ckeditor5/tests/src/Kernel/LanguageTest.php \Drupal\Tests\ckeditor5\Kernel\LanguageTest::provider()
Provides a list of language code pairs.
Return value
\string[][]
File
-
core/
modules/ ckeditor5/ tests/ src/ Kernel/ LanguageTest.php, line 99
Class
- LanguageTest
- Tests language resolving for CKEditor 5.
Namespace
Drupal\Tests\ckeditor5\KernelCode
public function provider() : array {
$random_langcode = $this->randomMachineName();
return [
'Language code transformed from browser mappings' => [
'drupal_langcode' => 'pt-pt',
'cke_langcode' => 'pt',
],
'Language code transformed from browser mappings 2' => [
'drupal_langcode' => 'zh-hans',
'cke_langcode' => 'zh-cn',
],
'Language code both in Drupal and CKEditor' => [
'drupal_langcode' => 'fi',
'cke_langcode' => 'fi',
],
'Language code not in Drupal but in CKEditor 5 requires new language.mappings entry' => [
'drupal_langcode' => $random_langcode,
'cke_langcode' => 'de-ch',
'is_missing_mapping' => TRUE,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.