You are here

public function MenuMultilingualTest::createViewsMenuItemTranslated in Menu Multilingual 8

Returns Views Menu Items translated.

1 call to MenuMultilingualTest::createViewsMenuItemTranslated()
MenuMultilingualTest::testViewsMenuItemTranslated in tests/src/Functional/MenuMultilingualTest.php
Test for View translated Menu Items.

File

tests/src/Functional/MenuMultilingualTest.php, line 639

Class

MenuMultilingualTest
Class MenuMultilingualTest.

Namespace

Drupal\Tests\menu_multilingual\Functional

Code

public function createViewsMenuItemTranslated() {
  $edit = [
    'menu[title]' => 'Views English menu item',
    'menu[type]' => 'normal',
    'menu[parent]' => 'main:',
  ];
  $this
    ->drupalGet('admin/structure/views/nojs/display/content/page_1/menu');
  $this
    ->submitForm($edit, 'Apply');
  $this
    ->drupalGet('admin/structure/views/view/content/edit/page_1');
  $this
    ->submitForm([], 'Save');
  $edit = [
    'translation[config_names][views.view.content][display][page_1][display_options][menu][title]' => 'Views French menu item',
  ];
  $this
    ->drupalGet('admin/structure/views/view/content/translate/fr/add');
  $this
    ->submitForm($edit, 'Save translation');
}