diff --git a/message_subscribe.links.menu.yml b/message_subscribe.links.menu.yml index 9d63da0..b94f6c9 100644 --- a/message_subscribe.links.menu.yml +++ b/message_subscribe.links.menu.yml @@ -2,4 +2,4 @@ message_subscribe.admin_settings: route_name: message_subscribe.admin_settings title: 'Message subscribe settings' description: 'Administer message subscribe' - parent: system.admin_config_system + parent: message.main_settings diff --git a/message_subscribe.routing.yml b/message_subscribe.routing.yml index aa0bcfb..9536145 100644 --- a/message_subscribe.routing.yml +++ b/message_subscribe.routing.yml @@ -1,5 +1,5 @@ message_subscribe.admin_settings: - path: /admin/config/system/message-subscribe + path: /admin/config/message/message-subscribe defaults: _title: 'Message subscribe settings' _form: \Drupal\message_subscribe\Form\MessageSubscribeAdminSettings diff --git a/tests/src/Functional/MenuTest.php b/tests/src/Functional/MenuTest.php new file mode 100644 index 0000000..4b237f1 --- /dev/null +++ b/tests/src/Functional/MenuTest.php @@ -0,0 +1,39 @@ +drupalCreateUser([], NULL, TRUE); + $this->drupalLogin($admin); + + // Link should appear on main config page. + $this->drupalGet(Url::fromRoute('system.admin_config')); + $this->assertSession()->linkExists(t('Message subscribe settings')); + + // Link should be on the message-specific overview page. + $this->drupalGet(Url::fromRoute('message.main_settings')); + $this->assertSession()->linkExists(t('Message subscribe settings')); + + $this->clickLink(t('Message subscribe settings')); + $this->assertSession()->statusCodeEquals(200); + } + +}