You are here

protected function LanguageFallbackTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 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() : void {
  parent::setUp();
  $i = 0;
  foreach ([
    'af',
    'am',
    'ar',
  ] as $langcode) {
    $language = ConfigurableLanguage::createFromLangcode($langcode);
    $language
      ->set('weight', $i--);
    $language
      ->save();
  }
}