protected function I18nBookNavigationTestBase::setMessage in Book translation 7.2
Display a message to the user running the current tests.
Parameters
string $message: The message to display to the user.
string $type: (optional) The type of the message. Can be 'status', 'warning' or 'error'. Defaults to 'status'.
See also
i18n_book_navigation_test_group_finished()
File
- tests/
i18n_book_navigation.test, line 412 - Unit tests for the Book translation module.
Class
- I18nBookNavigationTestBase
- @file Unit tests for the Book translation module.
Code
protected function setMessage($message, $type = 'status') {
// Use the live database.
db_set_active('simpletest_original_default');
$messages = variable_get('i18n_book_navigation_test_messages', array());
$messages[] = array(
'message' => $message,
'type' => $type,
);
variable_set('i18n_book_navigation_test_messages', $messages);
// Switch back to the database currently used by Simpletest.
db_set_active('default');
}