function RouteProviderTest::providerMixedCaseRoutePaths

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php \Drupal\KernelTests\Core\Routing\RouteProviderTest::providerMixedCaseRoutePaths()
  2. 10 core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php \Drupal\KernelTests\Core\Routing\RouteProviderTest::providerMixedCaseRoutePaths()
  3. 11.x 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

Class

RouteProviderTest
Confirm that the default route provider is working correctly.

Namespace

Drupal\KernelTests\Core\Routing

Code

public function providerMixedCaseRoutePaths() {
    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',
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.