You are here

function _system_test_first_shutdown_function in Drupal 8

Same name and namespace in other branches
  1. 7 modules/simpletest/tests/system_test.module \_system_test_first_shutdown_function()
  2. 9 core/modules/system/tests/modules/system_test/system_test.module \_system_test_first_shutdown_function()

Dummy shutdown function which registers another shutdown function.

2 string references to '_system_test_first_shutdown_function'
ShutdownFunctionsTest::testShutdownFunctions in core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php
Test shutdown functions.
SystemTestController::shutdownFunctions in core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php
A simple page callback which adds a register shutdown function.

File

core/modules/system/tests/modules/system_test/system_test.module, line 119
Test module.

Code

function _system_test_first_shutdown_function($arg1, $arg2) {

  // Set something to ensure that this function got called.
  \Drupal::state()
    ->set('_system_test_first_shutdown_function', [
    $arg1,
    $arg2,
  ]);
  drupal_register_shutdown_function('_system_test_second_shutdown_function', $arg1, $arg2);
}