You are here

function BackupMigrateFunctionalityTest::removeDrupalMessage in Backup and Migrate 5

Same name and namespace in other branches
  1. 6.3 tests/backup_migrate.functionality.test \BackupMigrateFunctionalityTest::removeDrupalMessage()
  2. 6.2 tests/backup_migrate.functionality.test \BackupMigrateFunctionalityTest::removeDrupalMessage()

File

tests/BackupMigrateFunctionalityTest.test, line 466

Class

BackupMigrateFunctionalityTest
Unit tests for Backup and Migrate module.

Code

function removeDrupalMessage($type, $drupal_message) {
  foreach (@$_SESSION['messages'][$type] as $key => $session_message) {
    if ($session_message == $drupal_message) {
      unset($_SESSION['messages'][$type][$key]);
    }
  }
}