123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- /**
- * @file
- * Unit tests for the xmlsitemap_menu project..
- */
- /**
- * Menu Functional Test.
- */
- class XMLSitemapMenuFunctionalTest extends XMLSitemapTestHelper {
- /**
- * Normal User.
- *
- * @var string
- *
- * @codingStandardsIgnoreStart
- */
- protected $normal_user;
- /**
- * Menu Items.
- *
- * @var array
- */
- protected $menu_items = array();
- /**
- * Get Info.
- *
- * @codingStandardsIgnoreEnd
- */
- public static function getInfo() {
- return array(
- 'name' => 'XML sitemap menu',
- 'description' => 'Functional tests for the XML sitemap menu module.',
- 'group' => 'XML sitemap',
- );
- }
- /**
- * Setup.
- */
- public function setUp($modules = array()) {
- $modules[] = 'xmlsitemap_menu';
- $modules[] = 'menu';
- parent::setUp($modules);
- $this->admin_user = $this->drupalCreateUser(array('administer menu', 'administer xmlsitemap'));
- $this->normal_user = $this->drupalCreateUser(array('access content'));
- }
- /**
- * Menu Settings.
- */
- public function testMenuSettings() {
- $this->drupalLogin($this->admin_user);
- $edit = array(
- 'title' => $this->randomName(),
- 'menu_name' => drupal_strtolower($this->randomName()),
- 'xmlsitemap[status]' => '1',
- 'xmlsitemap[priority]' => '1.0',
- );
- $this->drupalPost('admin/structure/menu/add', $edit, 'Save');
- $this->clickLink('Add link');
- $edit = array(
- 'link_title' => $this->randomName(),
- 'link_path' => 'node',
- 'xmlsitemap[status]' => 'default',
- 'xmlsitemap[priority]' => 'default',
- );
- $this->drupalPost(NULL, $edit, 'Save');
- }
- }
|