You are here

function system_test_drupal_set_message in Drupal 7

Sets two messages and removes the first one before the messages are displayed.

1 string reference to 'system_test_drupal_set_message'
system_test_menu in modules/simpletest/tests/system_test.module
Implements hook_menu().

File

modules/simpletest/tests/system_test.module, line 465

Code

function system_test_drupal_set_message() {

  // Set two messages.
  drupal_set_message('First message (removed).');
  drupal_set_message('Second message (not removed).');

  // Remove the first.
  unset($_SESSION['messages']['status'][0]);
  return '';
}