summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-03-30 18:35:29 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-03-30 18:35:29 -0400
commita610b977aab78ebdacf35033c2d8695d83733795 (patch)
treec49590001c93ae72663410f913af8f1de9a0c0d3 /modules/simpletest
parentc17ccc02ae279900653affd9691e372554df1991 (diff)
downloadbrdo-a610b977aab78ebdacf35033c2d8695d83733795.tar.gz
brdo-a610b977aab78ebdacf35033c2d8695d83733795.tar.bz2
Issue #713462 by jwilson3, Paul B, casey, sivaji@knackforge.com, dcam: Content added via drupal_add_region_content() is not added to pages
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/tests/theme.test9
-rw-r--r--modules/simpletest/tests/theme_test.module13
2 files changed, 22 insertions, 0 deletions
diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test
index f1a743e00..f5ddfa9b0 100644
--- a/modules/simpletest/tests/theme.test
+++ b/modules/simpletest/tests/theme.test
@@ -155,6 +155,15 @@ class ThemeTestCase extends DrupalWebTestCase {
$this->assertNotEqual(theme_get_setting('subtheme_override', 'test_basetheme'), theme_get_setting('subtheme_override', 'test_subtheme'), 'Base theme\'s default settings values can be overridden by subtheme.');
$this->assertIdentical(theme_get_setting('basetheme_only', 'test_subtheme'), 'base theme value', 'Base theme\'s default settings values are inherited by subtheme.');
}
+
+ /**
+ * Test the drupal_add_region_content() function.
+ */
+ function testDrupalAddRegionContent() {
+ $this->drupalGet('theme-test/drupal-add-region-content');
+ $this->assertText('Hello');
+ $this->assertText('World');
+ }
}
/**
diff --git a/modules/simpletest/tests/theme_test.module b/modules/simpletest/tests/theme_test.module
index 61a12bb70..948d8175a 100644
--- a/modules/simpletest/tests/theme_test.module
+++ b/modules/simpletest/tests/theme_test.module
@@ -53,6 +53,11 @@ function theme_test_menu() {
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
+ $items['theme-test/drupal-add-region-content'] = array(
+ 'page callback' => '_theme_test_drupal_add_region_content',
+ 'access callback' => TRUE,
+ 'type' => MENU_CALLBACK,
+ );
return $items;
}
@@ -127,6 +132,14 @@ function _theme_test_suggestion() {
}
/**
+ * Page callback, calls drupal_add_region_content.
+ */
+function _theme_test_drupal_add_region_content() {
+ drupal_add_region_content('content', 'World');
+ return 'Hello';
+}
+
+/**
* Theme function for testing theme('theme_test_foo').
*/
function theme_theme_test_foo($variables) {