diff --git a/core/modules/user/src/Tests/UserLogoutTest.php b/core/modules/user/src/Tests/UserLogoutTest.php new file mode 100644 index 0000000000..4df958cfe8 --- /dev/null +++ b/core/modules/user/src/Tests/UserLogoutTest.php @@ -0,0 +1,32 @@ +setFormat('html', ['text/html']); + + /** @var \Symfony\Component\HttpKernel\HttpKernelInterface $kernel */ + $kernel = \Drupal::getContainer()->get('http_kernel'); + $response = $kernel->handle($request)->prepare($request); + + $this->assertNotEqual($response->getStatusCode(), Response::HTTP_FORBIDDEN, + 'Anonymous users may view /user/logout without 403 error' + ); + } + +}