summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/theme_test.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/theme_test.module')
-rw-r--r--modules/simpletest/tests/theme_test.module18
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/simpletest/tests/theme_test.module b/modules/simpletest/tests/theme_test.module
index 48e2e83c6..a9bd2ad24 100644
--- a/modules/simpletest/tests/theme_test.module
+++ b/modules/simpletest/tests/theme_test.module
@@ -4,13 +4,19 @@
* Implements hook_theme().
*/
function theme_test_theme($existing, $type, $theme, $path) {
+ $items['theme_test'] = array(
+ 'file' => 'theme_test.inc',
+ 'variables' => array('foo' => ''),
+ );
$items['theme_test_template_test'] = array(
'template' => 'theme_test.template_test',
);
$items['theme_test_template_test_2'] = array(
'template' => 'theme_test.template_test',
);
-
+ $items['theme_test_foo'] = array(
+ 'variables' => array('foo' => NULL),
+ );
return $items;
}
@@ -115,14 +121,12 @@ function _theme_test_alter() {
* Page callback, calls a theme hook suggestion.
*/
function _theme_test_suggestion() {
- return theme(array('breadcrumb__suggestion', 'breadcrumb'), array());
+ return theme(array('theme_test__suggestion', 'theme_test'), array());
}
/**
- * Implements hook_preprocess_breadcrumb().
- *
- * Set a variable that can later be tested to see if this function ran.
+ * Theme function for testing theme('theme_test_foo').
*/
-function theme_test_preprocess_breadcrumb(&$variables) {
- $variables['theme_test_preprocess_breadcrumb'] = 1;
+function theme_theme_test_foo($variables) {
+ return $variables['foo'];
}