You are here

protected function MenuUiLanguageTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php \Drupal\Tests\menu_ui\Functional\MenuUiLanguageTest::setUp()
  2. 10 core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php \Drupal\Tests\menu_ui\Functional\MenuUiLanguageTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php, line 38

Class

MenuUiLanguageTest
Tests for menu_ui language settings.

Namespace

Drupal\Tests\menu_ui\Functional

Code

protected function setUp() {
  parent::setUp();
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'access administration pages',
    'administer menu',
  ]));

  // Add some custom languages.
  foreach ([
    'aa',
    'bb',
    'cc',
    'cs',
  ] as $language_code) {
    ConfigurableLanguage::create([
      'id' => $language_code,
      'label' => $this
        ->randomMachineName(),
    ])
      ->save();
  }
}