diff options
Diffstat (limited to 'modules/simpletest/tests/menu_test.module')
-rw-r--r-- | modules/simpletest/tests/menu_test.module | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/simpletest/tests/menu_test.module b/modules/simpletest/tests/menu_test.module index 194fe8006..1e436ee59 100644 --- a/modules/simpletest/tests/menu_test.module +++ b/modules/simpletest/tests/menu_test.module @@ -203,7 +203,7 @@ function menu_test_theme_page_callback($inherited = FALSE) { // Now check both the requested custom theme and the actual theme being used. $custom_theme = menu_get_custom_theme(); $requested_theme = empty($custom_theme) ? 'NONE' : $custom_theme; - $output = "Requested theme: $requested_theme. Actual theme: $theme_key."; + $output = "Custom theme: $requested_theme. Actual theme: $theme_key."; if ($inherited) { $output .= ' Theme callback inheritance is being tested.'; } @@ -237,6 +237,21 @@ function menu_test_theme_callback($argument) { } /** + * Implement hook_custom_theme(). + * + * @return + * The name of the custom theme to use for the current page. + */ +function menu_test_custom_theme() { + // If an appropriate variable has been set in the database, request the theme + // that is stored there. Otherwise, do not attempt to dynamically set the + // theme. + if ($theme = variable_get('menu_test_hook_custom_theme_name', FALSE)) { + return $theme; + } +} + +/** * Helper function for the testMenuName() test. Used to change the menu_name * parameter of a menu. * |