You are here

public function RouteProviderTest::providerMixedCaseRoutePaths in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php \Drupal\KernelTests\Core\Routing\RouteProviderTest::providerMixedCaseRoutePaths()
  2. 9 core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php \Drupal\KernelTests\Core\Routing\RouteProviderTest::providerMixedCaseRoutePaths()

Data provider for testMixedCasePaths()

File

core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php, line 209
Contains \Drupal\KernelTests\Core\Routing\RouteProviderTest.

Class

RouteProviderTest
Confirm that the default route provider is working correctly.

Namespace

Drupal\KernelTests\Core\Routing

Code

public function providerMixedCaseRoutePaths() {

  // cSpell:disable
  return [
    [
      '/path/one',
      'route_a',
    ],
    [
      '/path/two',
      NULL,
    ],
    [
      '/PATH/one',
      'route_a',
    ],
    [
      '/path/2/one',
      'route_b',
      'PUT',
    ],
    [
      '/paTH/3/one',
      'route_b',
      'PUT',
    ],
    // There should be no lower case of a Hebrew letter.
    [
      '/somewhere/4/over/the/קainbow',
      'route_c',
    ],
    [
      '/Somewhere/5/over/the/קainboW',
      'route_c',
    ],
    [
      '/another/llama/aboUT/22',
      'route_d',
    ],
    [
      '/another/llama/about/22',
      'route_d',
    ],
    [
      '/place/meΦω',
      'route_e',
      'HEAD',
    ],
    [
      '/place/meφΩ',
      'route_e',
      'HEAD',
    ],
  ];

  // cSpell:enable
}