function TestControllers::rejectsQueryStrings
Same name in other branches
- 11.x core/modules/system/tests/modules/router_test_directory/src/TestControllers.php \Drupal\router_test\TestControllers::rejectsQueryStrings()
Rejects requests with query keys.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The given request.
Return value
\Symfony\Component\HttpFoundation\Response The response.
1 string reference to 'TestControllers::rejectsQueryStrings'
- router_test.routing.yml in core/
modules/ system/ tests/ modules/ router_test_directory/ router_test.routing.yml - core/modules/system/tests/modules/router_test_directory/router_test.routing.yml
File
-
core/
modules/ system/ tests/ modules/ router_test_directory/ src/ TestControllers.php, line 130
Class
- TestControllers
- Controller routines for testing the routing system.
Namespace
Drupal\router_testCode
public function rejectsQueryStrings(Request $request) {
return new Response('', $request->query
->keys() ? Response::HTTP_BAD_REQUEST : Response::HTTP_OK);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.