LocaleStringTest.php in Language Hierarchy 2.x
File
tests/src/Kernel/Core/LocaleStringTest.php
View source
<?php
namespace Drupal\Tests\language_hierarchy\Kernel\Core;
use Drupal\KernelTests\KernelTestBase;
use Drupal\Tests\locale\Kernel\LocaleStringTest as CoreLocaleStringTest;
use Drupal\language\Entity\ConfigurableLanguage;
class LocaleStringTest extends CoreLocaleStringTest {
protected static $modules = [
'config_translation',
'language',
'language_hierarchy',
'locale',
];
protected function setUp() {
KernelTestBase::setUp();
$this
->installSchema('language_hierarchy', [
'language_hierarchy_priority',
]);
$this->storage = $this->container
->get('locale.storage');
foreach ([
'es',
'de',
] as $langcode) {
ConfigurableLanguage::createFromLangcode($langcode)
->save();
}
$this
->installSchema('locale', [
'locales_location',
'locales_source',
'locales_target',
]);
}
}