diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-04-26 14:06:23 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-04-26 14:06:23 +0000 |
commit | b94665f5aec34875c61ac28db847b104026b429e (patch) | |
tree | 4234d347f53bb837220c7405de1d476f077039d1 /modules | |
parent | 40c1805350a1937da198e878720e411de059120d (diff) | |
download | brdo-b94665f5aec34875c61ac28db847b104026b429e.tar.gz brdo-b94665f5aec34875c61ac28db847b104026b429e.tar.bz2 |
- Patch #688334 by stella, BTMash, carlos8f, chx: fixed file inheritance is broken.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/tests/menu.test | 9 | ||||
-rw-r--r-- | modules/simpletest/tests/menu_test.module | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/modules/simpletest/tests/menu.test b/modules/simpletest/tests/menu.test index d9563a86a..0e6da766b 100644 --- a/modules/simpletest/tests/menu.test +++ b/modules/simpletest/tests/menu.test @@ -52,6 +52,15 @@ class MenuRouterTestCase extends DrupalWebTestCase { } /** + * Test that 'page callback', 'file' and 'file path' keys are properly + * inherited from parent menu paths. + */ + function testFileInheritance() { + $this->drupalGet('admin/config/development/file-inheritance'); + $this->assertText('File inheritance test description', t('File inheritance works.')); + } + + /** * Test path containing "exotic" characters. */ function testExoticPath() { diff --git a/modules/simpletest/tests/menu_test.module b/modules/simpletest/tests/menu_test.module index 1e436ee59..ee8f2ea1b 100644 --- a/modules/simpletest/tests/menu_test.module +++ b/modules/simpletest/tests/menu_test.module @@ -173,6 +173,22 @@ function menu_test_menu() { 'context' => MENU_CONTEXT_NONE, ); + // File inheritance tests. This menu item should inherit the page callback + // system_admin_menu_block_page() and therefore render its children as links + // on the page. + $items['admin/config/development/file-inheritance'] = array( + 'title' => 'File inheritance', + 'description' => 'Test file inheritance', + 'access arguments' => array('access content'), + ); + $items['admin/config/development/file-inheritance/inherit'] = array( + 'title' => 'Inherit', + 'description' => 'File inheritance test description', + 'page callback' => 'menu_test_callback', + 'access arguments' => array('access content'), + 'type' => MENU_LOCAL_TASK, + ); + return $items; } |