function TestController::subRequest

Same name and namespace in other branches
  1. main core/modules/system/tests/modules/http_kernel_test/src/Controller/TestController.php \Drupal\http_kernel_test\Controller\TestController::subRequest()

Return an empty response.

1 string reference to 'TestController::subRequest'
http_kernel_test.routing.yml in core/modules/system/tests/modules/http_kernel_test/http_kernel_test.routing.yml
core/modules/system/tests/modules/http_kernel_test/http_kernel_test.routing.yml

File

core/modules/system/tests/modules/http_kernel_test/src/Controller/TestController.php, line 33

Class

TestController
A test controller.

Namespace

Drupal\http_kernel_test\Controller

Code

public function subRequest() : Response {
  $sub_request = Request::create('/http-kernel-test-sub-sub-request');
  return $this->kernel
    ->handle($sub_request, KernelInterface::SUB_REQUEST);
}

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