core/lib/Drupal/Core/Routing/AccessAwareRouter.php | 3 --- core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php index 0d592fa..1a93b42 100644 --- a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php +++ b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php @@ -113,9 +113,6 @@ protected function checkAccess(Request $request) { $request->attributes->set(AccessAwareRouterInterface::ACCESS_RESULT, $access_result); } if (!$access_result->isAllowed()) { - print_r('----------'); - print_r($access_result instanceof CacheableDependencyInterface); - print_r('+--------+'); if ($access_result instanceof CacheableDependencyInterface && $request->isMethodCacheable()) { throw new CacheableAccessDeniedHttpException($access_result, $access_result instanceof AccessResultReasonInterface ? $access_result->getReason() : NULL); } diff --git a/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php b/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php index 5d68f95..3215d9c 100644 --- a/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php +++ b/core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php @@ -3,6 +3,7 @@ namespace Drupal\KernelTests\Core\Routing; use Drupal\Component\Utility\Html; +use Drupal\Core\Cache\CacheableJsonResponse; use Drupal\KernelTests\KernelTestBase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -56,6 +57,7 @@ public function testJson403() { $this->assertEqual($response->getStatusCode(), Response::HTTP_FORBIDDEN); $this->assertEqual($response->headers->get('Content-type'), 'application/json'); $this->assertEqual('{"message":""}', $response->getContent()); + $this->assertInstanceOf(CacheableJsonResponse::class, $response); } /**