Commit f2bee5d5 authored by catch's avatar catch

Issue #2414047 by dawehner, larowlan: MenuLinkContent calls...

Issue #2414047 by dawehner, larowlan: MenuLinkContent calls getUrlInfo('content-translation-overview') when it should be 'drupal:content-translation-overview'
parent 4dae1d99
......@@ -194,7 +194,7 @@ public function getEditRoute() {
* {@inheritdoc}
*/
public function getTranslateRoute() {
return $this->getEntity()->urlInfo('content-translation-overview');
return $this->getEntity()->urlInfo('drupal:content-translation-overview');
}
/**
......
......@@ -8,6 +8,7 @@
namespace Drupal\menu_link_content\Tests;
use Drupal\content_translation\Tests\ContentTranslationUITest;
use Drupal\menu_link_content\Entity\MenuLinkContent;
/**
* Tests the menu link content UI.
......@@ -62,6 +63,19 @@ protected function createEntity($values, $langcode, $bundle_name = NULL) {
return parent::createEntity($values, $langcode, $bundle_name);
}
/**
* Ensure that a translate link can be found on the menu edit form.
*/
public function testTranslationLinkOnMenuEditForm() {
$this->drupalGet('admin/structure/menu/manage/tools');
$this->assertNoLink(t('Translate'));
$menu_link_content = MenuLinkContent::create(['menu_name' => 'tools', 'route_name' => 'entity.menu.collection']);
$menu_link_content->save();
$this->drupalGet('admin/structure/menu/manage/tools');
$this->assertLink(t('Translate'));
}
/**
* Tests that translation page inherits admin status of edit page.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment