diff --git a/core/modules/system/src/Tests/Routing/RouterTest.php b/core/modules/system/src/Tests/Routing/RouterTest.php index c92a79a..6cbab84 100644 --- a/core/modules/system/src/Tests/Routing/RouterTest.php +++ b/core/modules/system/src/Tests/Routing/RouterTest.php @@ -212,7 +212,7 @@ public function testRouterMatching() { } /** - * Tests the route path case insensitivity. + * Tests the route path and route path with slug case insensitivity. */ public function testRoutePathMixedCase() { $this->drupalGet('router_test/TEST14/1'); @@ -230,6 +230,23 @@ public function testRoutePathMixedCase() { $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/test3/{mixedCASE}'); + $this->assertResponse(200); + $this->assertRaw('{mixedCASE}', 'The correct string was returned because the route was successful.'); + + $this->drupalGet('router_test/test3/{mixedcase}'); + $this->assertResponse(200); + $this->assertRaw('{mixedcase}', 'The correct string was returned because the route was successful.'); + + $this->drupalGet('router_test/test3/{mixedCAse}'); + $this->assertResponse(200); + $this->assertRaw('{mixedCAse}', 'The correct string was returned because the route was successful.'); + + $this->drupalGet('router_test/test3/{MIXEDCASE}'); + $this->assertResponse(200); + $this->assertRaw('{MIXEDCASE}', 'The correct string was returned because the route was successful.'); + } /** 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 2318822..5fcd5db 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 @@ -196,3 +196,10 @@ router_test.mixedcase.2: _controller: '\Drupal\router_test\TestControllers::test2' requirements: _access: 'TRUE' + +router_test.mixedcaseslug.3: + path: '/router_test/test3/{mixedCASE}' + defaults: + _controller: '\Drupal\router_test\TestControllers::test3' + requirements: + _access: 'TRUE'