You are here

public function FieldLinkTest::canonicalizeUriDataProvider in Drupal 8

Same name in this branch
  1. 8 core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php \Drupal\Tests\link\Unit\Plugin\migrate\process\FieldLinkTest::canonicalizeUriDataProvider()
  2. 8 core/modules/link/tests/src/Unit/Plugin/migrate/process/d6/FieldLinkTest.php \Drupal\Tests\link\Unit\Plugin\migrate\process\d6\FieldLinkTest::canonicalizeUriDataProvider()

Data provider for testCanonicalizeUri.

File

core/modules/link/tests/src/Unit/Plugin/migrate/process/d6/FieldLinkTest.php, line 32

Class

FieldLinkTest
@group Link @group legacy

Namespace

Drupal\Tests\link\Unit\Plugin\migrate\process\d6

Code

public function canonicalizeUriDataProvider() {
  return [
    'Simple front-page' => [
      '<front>',
      'internal:/',
    ],
    'Front page with query' => [
      '<front>?query=1',
      'internal:/?query=1',
    ],
    'No leading forward slash' => [
      'node/10',
      'internal:/node/10',
    ],
    'Leading forward slash' => [
      '/node/10',
      'internal:/node/10',
    ],
    'Existing scheme' => [
      'scheme:test',
      'scheme:test',
    ],
  ];
}