You are here

protected function MenuMultilingualMenuBlockTest::setUp in Menu Multilingual 8

Overrides MenuMultilingualTest::setUp

File

tests/src/Functional/MenuMultilingualMenuBlockTest.php, line 29

Class

MenuMultilingualMenuBlockTest
Class MenuMultilingualMenuBlockTest.

Namespace

Drupal\Tests\menu_multilingual\Functional

Code

protected function setUp() : void {
  parent::setUp();

  // Remove the default main menu and replace it with a menu_block.
  $this
    ->drupalGet('admin/structure/block/manage/stark_main_menu/delete');
  $this
    ->submitForm([], 'Remove');
  $this
    ->drupalGet('admin/structure/block/add/menu_block:main/stark');
  $this
    ->submitForm([
    'id' => 'mainnavigation',
    'settings[label]' => 'Main navigation',
    'settings[label_display]' => FALSE,
    'settings[level]' => 1,
    'settings[depth]' => 0,
    'settings[expand_all_items]' => 1,
    'settings[suggestion]' => 'main',
    'settings[only_translated_labels]' => FALSE,
    'settings[only_translated_content]' => FALSE,
    'region' => 'primary_menu',
  ], 'Save block');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}