function ComponentTranslationTest::setUp

File

core/tests/Drupal/KernelTests/Components/ComponentTranslationTest.php, line 50

Class

ComponentTranslationTest
Tests the component can be translated.

Namespace

Drupal\KernelTests\Components

Code

protected function setUp() : void {
    parent::setUp();
    // Add a default locale storage for all these tests.
    $this->storage = $this->container
        ->get('locale.storage');
    ConfigurableLanguage::createFromLangcode('epa')->save();
    $this->container
        ->get('string_translation')
        ->setDefaultLangcode('epa');
    $this->installSchema('locale', [
        'locales_location',
        'locales_source',
        'locales_target',
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.