diff --git a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php index bbcdc3b..88b6c05 100644 --- a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php @@ -251,8 +251,9 @@ public function testAliasGenerationUsingInterfaceConstants() { public function testUrlGenerationWithDisabledPathProcessing() { $path_processor = $this->prophesize(OutboundPathProcessorInterface::class); $path_processor->processOutbound(Argument::cetera())->shouldNotBeCalled(); + $route_preloader = $this->prophesize(RoutePreloader::class); - $generator = new UrlGenerator($this->provider, $path_processor->reveal(), $this->routeProcessorManager, $this->requestStack, ['http', 'https']); + $generator = new UrlGenerator($this->provider, $path_processor->reveal(), $this->routeProcessorManager, $this->requestStack, $route_preloader->reveal(), ['http', 'https']); $generator->setContext($this->context); $url = $this->generator->generateFromRoute('test_1', [], ['path_processing' => FALSE]); @@ -265,11 +266,12 @@ public function testUrlGenerationWithDisabledPathProcessing() { public function testUrlGenerationWithDisabledPathProcessingByRoute() { $path_processor = $this->prophesize(OutboundPathProcessorInterface::class); $path_processor->processOutbound(Argument::cetera())->shouldNotBeCalled(); + $route_preloader = $this->prophesize(RoutePreloader::class); $provider = $this->prophesize(RouteProviderInterface::class); $provider->getRouteByName('test_1')->willReturn(new Route('/test/one', [], [], ['default_url_options' => ['path_processing' => FALSE]])); - $generator = new UrlGenerator($provider->reveal(), $path_processor->reveal(), $this->routeProcessorManager, $this->requestStack, ['http', 'https']); + $generator = new UrlGenerator($provider->reveal(), $path_processor->reveal(), $this->routeProcessorManager, $this->requestStack, $route_preloader->reveal(), ['http', 'https']); $generator->setContext($this->context); $url = $generator->generateFromRoute('test_1', []); @@ -282,11 +284,12 @@ public function testUrlGenerationWithDisabledPathProcessingByRoute() { public function testUrlGenerationWithDisabledPathProcessingByRouteAndOptedInPathProcessing() { $path_processor = $this->prophesize(OutboundPathProcessorInterface::class); $path_processor->processOutbound('/test/one', Argument::cetera())->willReturn('/hello/world')->shouldBeCalled(); + $route_preloader = $this->prophesize(RoutePreloader::class); $provider = $this->prophesize(RouteProviderInterface::class); $provider->getRouteByName('test_1')->willReturn(new Route('/test/one', [], [], ['default_url_options' => ['path_processing' => FALSE]])); - $generator = new UrlGenerator($provider->reveal(), $path_processor->reveal(), $this->routeProcessorManager, $this->requestStack, ['http', 'https']); + $generator = new UrlGenerator($provider->reveal(), $path_processor->reveal(), $this->routeProcessorManager, $this->requestStack, $route_preloader->reveal(), ['http', 'https']); $generator->setContext($this->context); $url = $generator->generateFromRoute('test_1', [], ['path_processing' => TRUE]);