From 426f82ac6dc41caa09d98168a40c96b677223831 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 21 Mar 2010 04:05:24 +0000 Subject: #241570 by effulgentsia and merlinofchaos: Fixed Theme preprocess functions do not get retained when using patterns. --- modules/simpletest/tests/theme_test.module | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 modules/simpletest/tests/theme_test.module (limited to 'modules/simpletest/tests/theme_test.module') diff --git a/modules/simpletest/tests/theme_test.module b/modules/simpletest/tests/theme_test.module new file mode 100644 index 000000000..52359778f --- /dev/null +++ b/modules/simpletest/tests/theme_test.module @@ -0,0 +1,40 @@ + 'Suggestion', + 'page callback' => '_theme_test_suggestion', + 'access arguments' => array('access content'), + 'theme callback' => '_theme_custom_theme', + 'type' => MENU_CALLBACK, + ); + + return $items; +} + +/** + * Custom theme callback. + */ +function _theme_custom_theme() { + return 'test_theme'; +} + +/** + * Page callback, calls a theme hook suggestion. + */ +function _theme_test_suggestion() { + return theme(array('breadcrumb__suggestion', 'breadcrumb'), array()); +} + +/** + * Implements hook_preprocess_breadcrumb(). + * + * Set a variable that can later be tested to see if this function ran. + */ +function theme_test_preprocess_breadcrumb(&$variables) { + $variables['theme_test_preprocess_breadcrumb'] = 1; +} -- cgit v1.2.3