function _system_test_second_shutdown_function in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/tests/modules/system_test/system_test.module \_system_test_second_shutdown_function()
Dummy shutdown function.
2 string references to '_system_test_second_shutdown_function'
- ShutdownFunctionsTest::testShutdownFunctions in core/
modules/ system/ src/ Tests/ System/ ShutdownFunctionsTest.php - Test shutdown functions.
- _system_test_first_shutdown_function in core/
modules/ system/ tests/ modules/ system_test/ system_test.module - Dummy shutdown function which registers another shutdown function.
File
- core/
modules/ system/ tests/ modules/ system_test/ system_test.module, line 104
Code
function _system_test_second_shutdown_function($arg1, $arg2) {
// Set something to ensure that this function got called.
\Drupal::state()
->set('_system_test_second_shutdown_function', array(
$arg1,
$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\Core\Utility\Error::renderExceptionSafe() if possible.
throw new Exception('Drupal is <blink>awesome</blink>.');
}