You are here

public function MenuLinkContentTranslationUITest::testTranslationLinkOnMenuEditForm in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/menu_link_content/src/Tests/MenuLinkContentTranslationUITest.php \Drupal\menu_link_content\Tests\MenuLinkContentTranslationUITest::testTranslationLinkOnMenuEditForm()

Ensure that a translate link can be found on the menu edit form.

File

core/modules/menu_link_content/src/Tests/MenuLinkContentTranslationUITest.php, line 74
Contains \Drupal\menu_link_content\Tests\MenuLinkContentTranslationUITest.

Class

MenuLinkContentTranslationUITest
Tests the menu link content translation UI.

Namespace

Drupal\menu_link_content\Tests

Code

public function testTranslationLinkOnMenuEditForm() {
  $this
    ->drupalGet('admin/structure/menu/manage/tools');
  $this
    ->assertNoLink(t('Translate'));
  $menu_link_content = MenuLinkContent::create([
    'menu_name' => 'tools',
    'link' => [
      'uri' => 'internal:/admin/structure/menu',
    ],
  ]);
  $menu_link_content
    ->save();
  $this
    ->drupalGet('admin/structure/menu/manage/tools');
  $this
    ->assertLink(t('Translate'));
}