You are here

public function RouteNormalizerRequestSubscriberTest::getTestUrls in Redirect 8

Data provider for testOnKernelRequestRedirect().

File

tests/src/Unit/RouteNormalizerRequestSubscriberTest.php, line 97

Class

RouteNormalizerRequestSubscriberTest
Tests the route normalizer.

Namespace

Drupal\Tests\redirect\Unit

Code

public function getTestUrls() {
  return [
    [
      'https://example.com/route-to-normalize',
      [],
      'https://example.com/route-to-normalize',
      FALSE,
    ],
    [
      'https://example.com/route-to-normalize',
      [
        'key' => 'value',
      ],
      'https://example.com/route-to-normalize?key=value',
      FALSE,
    ],
    [
      'https://example.com/index.php/',
      [
        'q' => 'node/1',
      ],
      'https://example.com/?q=node/1',
      TRUE,
    ],
  ];
}