function PathProcessorFrontTest::providerProcessInbound

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php \Drupal\Tests\Core\PathProcessor\PathProcessorFrontTest::providerProcessInbound()
  2. 10 core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php \Drupal\Tests\Core\PathProcessor\PathProcessorFrontTest::providerProcessInbound()
  3. 9 core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php \Drupal\Tests\Core\PathProcessor\PathProcessorFrontTest::providerProcessInbound()
  4. 8.9.x core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php \Drupal\Tests\Core\PathProcessor\PathProcessorFrontTest::providerProcessInbound()

Inbound paths and expected results.

File

core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php, line 45

Class

PathProcessorFrontTest
Test front page path processing.

Namespace

Drupal\Tests\Core\PathProcessor

Code

public static function providerProcessInbound() : array {
  return [
    'accessing frontpage' => [
      '/node',
      '/',
      '/node',
    ],
    'accessing non frontpage' => [
      '/node',
      '/user',
      '/user',
    ],
    'accessing frontpage with query parameters' => [
      '/node?example=muh',
      '/',
      '/node',
      [
        'example' => 'muh',
      ],
    ],
    'frontpage with query parameters and request query parameters' => [
      '/node?example=muh',
      '/',
      '/node',
      [
        'example' => 'muh',
        'example2' => 'buh',
      ],
      [
        'example2' => 'buh',
      ],
    ],
    'frontpage with query parameters and replacement request query parameters' => [
      '/node?example=muh',
      '/',
      '/node',
      [
        'example' => 'cuh',
        'example2' => 'buh',
      ],
      [
        'example' => 'cuh',
        'example2' => 'buh',
      ],
    ],
  ];
}

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