function FeedLanguageTest::setUp

Same name in other branches
  1. 9 core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php \Drupal\Tests\aggregator\Functional\FeedLanguageTest::setUp()

Overrides AggregatorTestBase::setUp

File

core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php, line 39

Class

FeedLanguageTest
Tests aggregator feeds in multiple languages.

Namespace

Drupal\Tests\aggregator\Functional

Code

protected function setUp() {
    parent::setUp();
    // Create test languages.
    $this->langcodes = [
        ConfigurableLanguage::load('en'),
    ];
    for ($i = 1; $i < 3; ++$i) {
        $language = ConfigurableLanguage::create([
            'id' => 'l' . $i,
            'label' => $this->randomString(),
        ]);
        $language->save();
        $this->langcodes[$i] = $language->id();
    }
}

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