function ThemeTestController::testRequestListener

Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController::testRequestListener()
  2. 10 core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController::testRequestListener()
  3. 11.x core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController::testRequestListener()

Tests themed output generated in a request listener.

Return value

string Content in theme_test_output GLOBAL.

1 string reference to 'ThemeTestController::testRequestListener'
theme_test.routing.yml in core/modules/system/tests/modules/theme_test/theme_test.routing.yml
core/modules/system/tests/modules/theme_test/theme_test.routing.yml

File

core/modules/system/tests/modules/theme_test/src/ThemeTestController.php, line 71

Class

ThemeTestController
Controller routines for theme test routes.

Namespace

Drupal\theme_test

Code

public function testRequestListener() {
    return [
        '#markup' => $GLOBALS['theme_test_output'],
    ];
}

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