diff --git a/core/lib/Drupal/Core/CoreBundle.php b/core/lib/Drupal/Core/CoreBundle.php index 9ef08f6..f16edda 100644 --- a/core/lib/Drupal/Core/CoreBundle.php +++ b/core/lib/Drupal/Core/CoreBundle.php @@ -372,13 +372,13 @@ protected function registerRouting(ContainerBuilder $container) { // Add core route enhancers to dynamically derive the _controller $container->register('route_enhancer.ajax', 'Drupal\Core\Routing\Enhancer\AjaxEnhancer') ->addArgument(new Reference('content_negotiation')) - ->addTag('route_enhancer', array('priority' => 20)); + ->addTag('route_enhancer', array('priority' => 20)); $container->register('route_enhancer.form', 'Drupal\Core\Routing\Enhancer\FormEnhancer') ->addArgument(new Reference('content_negotiation')) - ->addTag('route_enhancer', array('priority' => 10)); + ->addTag('route_enhancer', array('priority' => 10)); $container->register('route_enhancer.page', 'Drupal\Core\Routing\Enhancer\PageEnhancer') ->addArgument(new Reference('content_negotiation')) - ->addTag('route_enhancer', array('priority' => 0)); + ->addTag('route_enhancer', array('priority' => 0)); $container->addCompilerPass(new RegisterRouteEnhancersPass()); } diff --git a/core/lib/Drupal/Core/Routing/Enhancer/AjaxEnhancer.php b/core/lib/Drupal/Core/Routing/Enhancer/AjaxEnhancer.php index daa9041..1fd99ea 100644 --- a/core/lib/Drupal/Core/Routing/Enhancer/AjaxEnhancer.php +++ b/core/lib/Drupal/Core/Routing/Enhancer/AjaxEnhancer.php @@ -9,7 +9,6 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Cmf\Component\Routing\Enhancer\RouteEnhancerInterface; - use Drupal\Core\ContentNegotiation; /** @@ -18,12 +17,15 @@ class AjaxEnhancer implements RouteEnhancerInterface { /** - * Content Negotiation library. + * Content negotiation library. * * @var \Drupal\CoreContentNegotiation */ protected $negotiation; + /** + * Constructs a new \Drupal\Core\Routing\Enhancer\AjaxEnhancer object. + */ public function __construct(ContentNegotiation $negotiation) { $this->negotiation = $negotiation; } @@ -46,4 +48,5 @@ public function enhance(array $defaults, Request $request) { } return $defaults; } + } diff --git a/core/lib/Drupal/Core/Routing/Enhancer/FormEnhancer.php b/core/lib/Drupal/Core/Routing/Enhancer/FormEnhancer.php index b56d7c3..2210d03 100644 --- a/core/lib/Drupal/Core/Routing/Enhancer/FormEnhancer.php +++ b/core/lib/Drupal/Core/Routing/Enhancer/FormEnhancer.php @@ -5,12 +5,10 @@ * Contains \Drupal\Core\Routing\Enhancer\FormEnhancer. */ - namespace Drupal\Core\Routing\Enhancer; use Symfony\Component\HttpFoundation\Request; use Symfony\Cmf\Component\Routing\Enhancer\RouteEnhancerInterface; - use Drupal\Core\ContentNegotiation; /** @@ -18,14 +16,16 @@ */ class FormEnhancer implements RouteEnhancerInterface { - /** - * Content Negotiation library. + * Content negotiation library. * * @var \Drupal\CoreContentNegotiation */ protected $negotiation; + /** + * Constructs a new \Drupal\Core\Routing\Enhancer\FormEnhancer object. + */ public function __construct(ContentNegotiation $negotiation) { $this->negotiation = $negotiation; } @@ -39,4 +39,5 @@ public function enhance(array $defaults, Request $request) { } return $defaults; } + } diff --git a/core/lib/Drupal/Core/Routing/Enhancer/PageEnhancer.php b/core/lib/Drupal/Core/Routing/Enhancer/PageEnhancer.php index 1c0611f..3d73e9e 100644 --- a/core/lib/Drupal/Core/Routing/Enhancer/PageEnhancer.php +++ b/core/lib/Drupal/Core/Routing/Enhancer/PageEnhancer.php @@ -9,7 +9,6 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Cmf\Component\Routing\Enhancer\RouteEnhancerInterface; - use Drupal\Core\ContentNegotiation; /** @@ -18,12 +17,15 @@ class PageEnhancer implements RouteEnhancerInterface { /** - * Content Negotiation library. + * Content negotiation library. * * @var \Drupal\CoreContentNegotiation */ protected $negotiation; + /** + * Constructs a new \Drupal\Core\Routing\Enhancer\PageEnhancer object. + */ public function __construct(ContentNegotiation $negotiation) { $this->negotiation = $negotiation; } @@ -37,4 +39,5 @@ public function enhance(array $defaults, Request $request) { } return $defaults; } + } diff --git a/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php b/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php index 532451b..352e89f 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php @@ -111,7 +111,6 @@ public function testDynamicRoutes() { * Checks that a request with text/html response gets rendered as a page. */ public function testControllerResolutionPage() { - $this->drupalGet('/router_test/test10'); $this->assertRaw('abcde', 'Correct body was found.');