summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/theme.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/theme.test')
-rw-r--r--modules/simpletest/tests/theme.test17
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test
index d3ba6f9bb..631d69d5b 100644
--- a/modules/simpletest/tests/theme.test
+++ b/modules/simpletest/tests/theme.test
@@ -9,15 +9,20 @@
/**
* Unit tests for the Theme API.
*/
-class TemplateUnitTest extends DrupalWebTestCase {
+class ThemeUnitTest extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'Theme API',
- 'description' => 'Test low-level theme template functions.',
+ 'description' => 'Test low-level theme functions.',
'group' => 'Theme',
);
}
+ function setUp() {
+ parent::setUp('theme_test');
+ theme_enable(array('test_theme'));
+ }
+
/**
* Test function theme_get_suggestions() for SA-CORE-2009-003.
*/
@@ -39,6 +44,14 @@ class TemplateUnitTest extends DrupalWebTestCase {
$suggestions = theme_get_suggestions($args, 'page');
$this->assertEqual($suggestions, array('page__node', 'page__node__%', 'page__node__1'), t('Removed invalid \\0 from suggestions'));
}
+
+ /**
+ * Preprocess functions for the base hook should run even for suggestion implementations.
+ */
+ 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.'));
+ }
/**
* Ensure page-front template suggestion is added when on front page.