public function ContentLanguageSettingsUnitTest::providerDefaultLangcode in Drupal 9
Same name and namespace in other branches
- 8 core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php \Drupal\Tests\language\Unit\ContentLanguageSettingsUnitTest::providerDefaultLangcode()
- 10 core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php \Drupal\Tests\language\Unit\ContentLanguageSettingsUnitTest::providerDefaultLangcode()
File
- core/
modules/ language/ tests/ src/ Unit/ ContentLanguageSettingsUnitTest.php, line 149
Class
- ContentLanguageSettingsUnitTest
- @coversDefaultClass \Drupal\language\Entity\ContentLanguageSettings @group language
Namespace
Drupal\Tests\language\UnitCode
public function providerDefaultLangcode() {
$langcode = $this
->randomMachineName();
$config = new ContentLanguageSettings([
'target_entity_type_id' => 'test_entity_type',
'target_bundle' => 'test_bundle',
], 'language_content_settings');
$config
->setDefaultLangcode($langcode);
$defaultConfig = new ContentLanguageSettings([
'target_entity_type_id' => 'test_entity_type',
'target_bundle' => 'test_default_language_bundle',
], 'language_content_settings');
return [
[
$config,
$langcode,
],
[
$defaultConfig,
LanguageInterface::LANGCODE_SITE_DEFAULT,
],
];
}