function LanguageFallbackTest::setUp

Same name in other branches
  1. 9 core/modules/language/tests/src/Kernel/LanguageFallbackTest.php \Drupal\Tests\language\Kernel\LanguageFallbackTest::setUp()
  2. 10 core/modules/language/tests/src/Kernel/LanguageFallbackTest.php \Drupal\Tests\language\Kernel\LanguageFallbackTest::setUp()
  3. 11.x core/modules/language/tests/src/Kernel/LanguageFallbackTest.php \Drupal\Tests\language\Kernel\LanguageFallbackTest::setUp()

Overrides LanguageTestBase::setUp

File

core/modules/language/tests/src/Kernel/LanguageFallbackTest.php, line 18

Class

LanguageFallbackTest
Tests the language fallback behavior.

Namespace

Drupal\Tests\language\Kernel

Code

protected function setUp() {
    parent::setUp();
    $i = 0;
    foreach ([
        'af',
        'am',
        'ar',
    ] as $langcode) {
        $language = ConfigurableLanguage::createFromLangcode($langcode);
        $language->set('weight', $i--);
        $language->save();
    }
}

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