diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-12-08 07:09:43 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-12-08 07:09:43 +0000 |
commit | 3254e88fdef94b82012f0ff5c7f3fd55a4766361 (patch) | |
tree | fc9bf9adcede1006aa03347a68ee1f53d62455c7 /modules/simpletest/tests/menu.test | |
parent | 8e22c48576e4f999137d1e01b3cd91f915752b97 (diff) | |
download | brdo-3254e88fdef94b82012f0ff5c7f3fd55a4766361.tar.gz brdo-3254e88fdef94b82012f0ff5c7f3fd55a4766361.tar.bz2 |
#651712 by carlos8f: Fixed bug where rendered menu tree links do not include proper attributes (with tests).
Diffstat (limited to 'modules/simpletest/tests/menu.test')
-rw-r--r-- | modules/simpletest/tests/menu.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/simpletest/tests/menu.test b/modules/simpletest/tests/menu.test index 0ff063ae8..475dac334 100644 --- a/modules/simpletest/tests/menu.test +++ b/modules/simpletest/tests/menu.test @@ -240,6 +240,31 @@ class MenuIncTestCase extends DrupalWebTestCase { $this->assertEqual(menu_test_static_variable(), 'delete', t('hook_menu_link_delete() fired correctly')); } + /** + * Test menu link 'options' storage and rendering. + */ + function testMenuLinkOptions() { + // Create a menu link with options. + $menu_link = array( + 'link_title' => 'Menu link options test', + 'link_path' => 'node', + 'module' => 'menu_test', + 'options' => array( + 'attributes' => array( + 'title' => 'Test title attribute', + ), + 'query' => array( + 'testparam' => 'testvalue', + ), + ), + ); + menu_link_save($menu_link); + + // Load front page. + $this->drupalGet('node'); + $this->assertRaw('title="Test title attribute"', t('Title attribute of a menu link renders.')); + $this->assertRaw('testparam=testvalue', t('Query parameter added to menu link.')); + } } /** |