diff --git a/core/modules/serialization/tests/src/Unit/EventSubscriber/DefaultExceptionSubscriberTest.php b/core/modules/serialization/tests/src/Unit/EventSubscriber/DefaultExceptionSubscriberTest.php
index e20f6f7fe29e74b951539fde12d3acb719f3c8a8..a9af659ce1bd65e15da28b027bf128e22db6ae2b 100644
--- a/core/modules/serialization/tests/src/Unit/EventSubscriber/DefaultExceptionSubscriberTest.php
+++ b/core/modules/serialization/tests/src/Unit/EventSubscriber/DefaultExceptionSubscriberTest.php
@@ -27,7 +27,7 @@ public function testOn4xx() {
     $request->setRequestFormat('json');
 
     $e = new MethodNotAllowedHttpException(['POST', 'PUT'], 'test message');
-    $event = new GetResponseForExceptionEvent($kernel->reveal(), $request, 'GET', $e);
+    $event = new GetResponseForExceptionEvent($kernel->reveal(), $request, HttpKernelInterface::MASTER_REQUEST, $e);
     $subscriber = new DefaultExceptionSubscriber(new Serializer([], [new JsonEncoder()]), []);
     $subscriber->on4xx($event);
     $response = $event->getResponse();
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
index 38cc28cc99e46e20c6a297897e56b3b752b3502b..ac2b371e0fbb5d7f566e3d7d4af4ce12fce81315 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
@@ -14,6 +14,7 @@
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use Symfony\Component\HttpKernel\HttpKernelInterface;
 use Symfony\Component\Routing\RequestContext;
 
 /**
@@ -138,7 +139,7 @@ public function testHandleWithPostRequest() {
       return new HtmlResponse($request->getMethod());
     }));
 
-    $event = new GetResponseForExceptionEvent($this->kernel, $request, 'foo', new NotFoundHttpException('foo'));
+    $event = new GetResponseForExceptionEvent($this->kernel, $request, HttpKernelInterface::MASTER_REQUEST, new NotFoundHttpException('foo'));
 
     $this->customPageSubscriber->onException($event);
 
@@ -165,7 +166,7 @@ public function testHandleWithGetRequest() {
       return new Response($request->getMethod() . ' ' . UrlHelper::buildQuery($request->query->all()));
     }));
 
-    $event = new GetResponseForExceptionEvent($this->kernel, $request, 'foo', new NotFoundHttpException('foo'));
+    $event = new GetResponseForExceptionEvent($this->kernel, $request, HttpKernelInterface::MASTER_REQUEST, new NotFoundHttpException('foo'));
     $this->customPageSubscriber->onException($event);
 
     $response = $event->getResponse();
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
index 2fadea64268b5388897adea33086941af33fb267..b40dd73df7b434148d1f6e959a38cd4fa14c4a30 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php
@@ -27,7 +27,7 @@ class ExceptionJsonSubscriberTest extends UnitTestCase {
   public function testOn4xx(HttpExceptionInterface $exception, $expected_response_class) {
     $kernel = $this->prophesize(HttpKernelInterface::class);
     $request = Request::create('/test');
-    $event = new GetResponseForExceptionEvent($kernel->reveal(), $request, 'GET', $exception);
+    $event = new GetResponseForExceptionEvent($kernel->reveal(), $request, HttpKernelInterface::MASTER_REQUEST, $exception);
     $subscriber = new ExceptionJsonSubscriber();
     $subscriber->on4xx($event);
     $response = $event->getResponse();
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/FinalExceptionSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/FinalExceptionSubscriberTest.php
index fbde643ed4fee2634842b30639f298d8265a3e39..9902fdd2b9ffc5e20aaaaec58d8e4bc4b88b2b27 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/FinalExceptionSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/FinalExceptionSubscriberTest.php
@@ -28,7 +28,7 @@ public function testOnExceptionWithUnknownFormat() {
     // of this so we'll hard code it here.
     $request->setRequestFormat('bananas');
     $e = new MethodNotAllowedHttpException(['POST', 'PUT'], 'test message');
-    $event = new GetResponseForExceptionEvent($kernel->reveal(), $request, 'GET', $e);
+    $event = new GetResponseForExceptionEvent($kernel->reveal(), $request, HttpKernelInterface::MASTER_REQUEST, $e);
     $subscriber = new TestDefaultExceptionSubscriber($config_factory);
     $subscriber->setStringTranslation($this->getStringTranslationStub());
     $subscriber->onException($event);