function ShutdownFunctionsTest::testShutdownFunctions

Test shutdown functions.

File

drupal/core/modules/system/lib/Drupal/system/Tests/System/ShutdownFunctionsTest.php, line 35
Definition of Drupal\system\Tests\System\ShutdownFunctionsTest.

Class

ShutdownFunctionsTest
Functional tests shutdown functions.

Namespace

Drupal\system\Tests\System

Code

function testShutdownFunctions() {
  $arg1 = $this
    ->randomName();
  $arg2 = $this
    ->randomName();
  $this
    ->drupalGet('system-test/shutdown-functions/' . $arg1 . '/' . $arg2);
  $this
    ->assertText(t('First shutdown function, arg1 : @arg1, arg2: @arg2', array(
    '@arg1' => $arg1,
    '@arg2' => $arg2,
  )));
  $this
    ->assertText(t('Second shutdown function, arg1 : @arg1, arg2: @arg2', array(
    '@arg1' => $arg1,
    '@arg2' => $arg2,
  )));

  // Make sure exceptions displayed through _drupal_render_exception_safe()
  // are correctly escaped.
  $this
    ->assertRaw('Drupal is <blink>awesome</blink>.');
}