diff --git a/core/modules/system/src/Tests/Routing/RouterTest.php b/core/modules/system/src/Tests/Routing/RouterTest.php index 4d532d1..ce56a72 100644 --- a/core/modules/system/src/Tests/Routing/RouterTest.php +++ b/core/modules/system/src/Tests/Routing/RouterTest.php @@ -211,6 +211,27 @@ public function testRouterMatching() { } /** + * Tests the route path case insensitivity + */ + public function testRoutePathMixedCase() { + $this->drupalGet('router_test/TEST14/1'); + $this->assertResponse(200); + $this->assertText('User route "entity.user.canonical" was matched.'); + + $this->drupalGet('/router_test/mixEDCASE2'); + $this->assertResponse(200); + $this->assertRaw('test2', 'The correct string was returned because the route was successful.'); + + $this->drupalGet('/router_TEST/MIXEDcase2'); + $this->assertResponse(200); + $this->assertRaw('test2', 'The correct string was returned because the route was successful.'); + + $this->drupalGet('/router_test/mixedcase2'); + $this->assertResponse(200); + $this->assertRaw('test2', 'The correct string was returned because the route was successful.'); + } + + /** * Tests that a PSR-7 response works. */ public function testRouterResponsePsr7() { diff --git a/core/modules/system/tests/modules/router_test_directory/router_test.routing.yml b/core/modules/system/tests/modules/router_test_directory/router_test.routing.yml index e0c91dd..2318822 100644 --- a/core/modules/system/tests/modules/router_test_directory/router_test.routing.yml +++ b/core/modules/system/tests/modules/router_test_directory/router_test.routing.yml @@ -189,3 +189,10 @@ router_test.hierarchy_parent_child2: _controller: '\Drupal\router_test\TestControllers::test' requirements: _access: 'TRUE' + +router_test.mixedcase.2: + path: '/router_test/mixedCASE2' + defaults: + _controller: '\Drupal\router_test\TestControllers::test2' + requirements: + _access: 'TRUE'