You are here

protected function LanguageFallbackTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/language/src/Tests/LanguageFallbackTest.php \Drupal\language\Tests\LanguageFallbackTest::setUp()

Performs setup tasks before each individual test method is run.

Overrides LanguageTestBase::setUp

File

core/modules/language/src/Tests/LanguageFallbackTest.php, line 23
Contains \Drupal\language\Tests\LanguageFallbackTest.

Class

LanguageFallbackTest
Tests the language fallback behavior.

Namespace

Drupal\language\Tests

Code

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