function _system_test_second_shutdown_function

Same name in other branches
  1. 9 core/modules/system/tests/modules/system_test/system_test.module \_system_test_second_shutdown_function()
  2. 8.9.x core/modules/system/tests/modules/system_test/system_test.module \_system_test_second_shutdown_function()
  3. 10 core/modules/system/tests/modules/system_test/system_test.module \_system_test_second_shutdown_function()
  4. 11.x core/modules/system/tests/modules/system_test/system_test.module \_system_test_second_shutdown_function()

Dummy shutdown function.

1 string reference to '_system_test_second_shutdown_function'
_system_test_first_shutdown_function in modules/simpletest/tests/system_test.module
Dummy shutdown function which registers another shutdown function.

File

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

Code

function _system_test_second_shutdown_function($arg1, $arg2) {
    // Output something, page has already been printed and the session stored
    // so we can't use drupal_set_message.
    print t('Second shutdown function, arg1 : @arg1, arg2: @arg2', array(
        '@arg1' => $arg1,
        '@arg2' => $arg2,
    ));
    // Throw an exception with an HTML tag. Since this is called in a shutdown
    // function, it will not bubble up to the default exception handler but will
    // be caught in _drupal_shutdown_function() and be displayed through
    // _drupal_render_exception_safe().
    throw new Exception('Drupal is <blink>awesome</blink>.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.