summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-03-30 22:12:31 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-03-30 22:12:31 -0400
commit63065623fba4087ba574b64efce054ae5a5b0683 (patch)
treea88483bfac5ebee9def28e866cce978ea6725375 /modules/system
parentb1001811d95d5b4dc7ca4916fc74f773106ac9f0 (diff)
downloadbrdo-63065623fba4087ba574b64efce054ae5a5b0683.tar.gz
brdo-63065623fba4087ba574b64efce054ae5a5b0683.tar.bz2
Issue #1946240 by hampercm, eiriksm, David_Rothstein, rpayanm, rszrama, Yaron Tal, dgtlife, madhusudanmca, er.pushpinderrana, Cottser: Remove the hardcoded 0 index in theme_status_messages()
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/system/system.test b/modules/system/system.test
index dcc86e539..3e26bae8c 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -2827,6 +2827,35 @@ class SystemValidTokenTest extends DrupalUnitTestCase {
}
/**
+ * Tests drupal_set_message() and related functions.
+ */
+class DrupalSetMessageTest extends DrupalWebTestCase {
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'Messages',
+ 'description' => 'Tests that messages can be displayed using drupal_set_message().',
+ 'group' => 'System',
+ );
+ }
+
+ function setUp() {
+ parent::setUp('system_test');
+ }
+
+ /**
+ * Tests setting messages and removing one before it is displayed.
+ */
+ function testSetRemoveMessages() {
+ // The page at system-test/drupal-set-message sets two messages and then
+ // removes the first before it is displayed.
+ $this->drupalGet('system-test/drupal-set-message');
+ $this->assertNoText('First message (removed).');
+ $this->assertText('Second message (not removed).');
+ }
+}
+
+/**
* Tests confirm form destinations.
*/
class ConfirmFormTest extends DrupalWebTestCase {