summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/theme.test
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-02-28 10:22:59 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2012-02-28 10:22:59 -0800
commit447d6a628bde3891a4be70a3d9131023214d00f3 (patch)
treea209c0e5047eb9a8b7e1bfd9cff4cd989a5a1162 /modules/simpletest/tests/theme.test
parent22135d9c0c7751ac45596c947b4918041a79eeb5 (diff)
downloadbrdo-447d6a628bde3891a4be70a3d9131023214d00f3.tar.gz
brdo-447d6a628bde3891a4be70a3d9131023214d00f3.tar.bz2
Issue #1430300 by mradcliffe, xjm, effulgentsia, NROTC_Webmaster: Fixed Preprocess functions in an include file fail to get called when the theme implements a suggestion override.
Diffstat (limited to 'modules/simpletest/tests/theme.test')
-rw-r--r--modules/simpletest/tests/theme.test16
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test
index af1141124..19775a7f8 100644
--- a/modules/simpletest/tests/theme.test
+++ b/modules/simpletest/tests/theme.test
@@ -52,11 +52,19 @@ class ThemeUnitTest extends DrupalWebTestCase {
}
/**
- * Preprocess functions for the base hook should run even for suggestion implementations.
- */
+ * Ensures preprocess functions run even for suggestion implementations.
+ *
+ * The theme hook used by this test has its base preprocess function in a
+ * separate file, so this test also ensures that that file is correctly loaded
+ * when needed.
+ */
function testPreprocessForSuggestions() {
- $this->drupalGet('theme-test/suggestion');
- $this->assertText('test_theme_breadcrumb__suggestion: 1', t('Theme hook suggestion ran with data available from a preprocess function for the base hook.'));
+ // Test with both an unprimed and primed theme registry.
+ drupal_theme_rebuild();
+ for ($i = 0; $i < 2; $i++) {
+ $this->drupalGet('theme-test/suggestion');
+ $this->assertText('Theme hook implementor=test_theme_theme_test__suggestion(). Foo=template_preprocess_theme_test', 'Theme hook suggestion ran with data available from a preprocess function for the base hook.');
+ }
}
/**