function LanguageTest::provider
Provides a list of language code pairs.
Return value
string[][]
File
- 
              core/modules/ ckeditor5/ tests/ src/ Kernel/ LanguageTest.php, line 100 
Class
- LanguageTest
- Tests language resolving for CKEditor 5.
Namespace
Drupal\Tests\ckeditor5\KernelCode
public static function provider() : array {
  $random_langcode = Random::machineName();
  return [
    'Language code transformed from browser mappings' => [
      'drupal_langcode' => 'pt-pt',
      'cke5_langcode' => 'pt',
    ],
    'Language code transformed from browser mappings 2' => [
      'drupal_langcode' => 'zh-hans',
      'cke5_langcode' => 'zh-cn',
    ],
    'Language code both in Drupal and CKEditor' => [
      'drupal_langcode' => 'fi',
      'cke5_langcode' => 'fi',
    ],
    'Language code not in Drupal but in CKEditor 5 requires new language.mappings entry' => [
      'drupal_langcode' => $random_langcode,
      'cke5_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.
