public function XmlSitemapMenuFunctionalTest::testMenuSettings in XML sitemap 2.x
Same name and namespace in other branches
- 8 tests/src/Functional/XmlSitemapMenuFunctionalTest.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapMenuFunctionalTest::testMenuSettings()
Test xmlsitemap settings for menu entity.
@todo In the D7 version of XML Sitemap, menus were acting as bundles for menu links. Should we bring back this behavior in D8?
File
- tests/
src/ Functional/ XmlSitemapMenuFunctionalTest.php, line 62
Class
- XmlSitemapMenuFunctionalTest
- Tests the generation of menu links.
Namespace
Drupal\Tests\xmlsitemap\FunctionalCode
public function testMenuSettings() {
// @codingStandardsIgnoreStart
// $this->drupalLogin($this->admin_user);
//
// $edit = [
// 'label' => $this->randomMachineName(),
// 'id' => mb_strtolower($this->randomMachineName()),
// 'xmlsitemap[status]' => '1',
// 'xmlsitemap[priority]' => '1.0',
// ];
// $this->drupalPostForm('admin/structure/menu/add', $edit, 'Save');
//
// xmlsitemap_link_bundle_settings_save('menu', $edit['id'], ['status' => 0, 'priority' => 0.5, 'changefreq' => 0]);
//
// $this->drupalGet('admin/structure/menu/manage/' . $edit['id']);
//
// $menu_id = $edit['id'];
// $this->clickLink('Add link');
// $edit = [
// 'link[0][uri]' => 'node',
// 'title[0][value]' => $this->randomMachineName(),
// 'description[0][value]' => '',
// 'enabled[value]' => 1,
// 'expanded[value]' => FALSE,
// 'menu_parent' => $menu_id . ':',
// 'weight[0][value]' => 0,
// ];
// $this->drupalPostForm(NULL, $edit, 'Save');.
// @codingStandardsIgnoreEnd
}