diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/DefaultExceptionSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/DefaultExceptionSubscriberTest.php index c44be6136e..6582500ee6 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/DefaultExceptionSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/DefaultExceptionSubscriberTest.php @@ -24,7 +24,7 @@ public function testOnExceptionWithUnknownFormat() { $config_factory = $this->getConfigFactoryStub(); $kernel = $this->prophesize(HttpKernelInterface::class); - $request = Request::create('/test'); + $request = Request::create('/test?_format=bananas'); $e = new MethodNotAllowedHttpException(['POST', 'PUT'], 'test message'); $event = new GetResponseForExceptionEvent($kernel->reveal(), $request, 'GET', $e); $subscriber = new DefaultExceptionSubscriber($config_factory);