function FieldLinkTest::canonicalizeUriDataProvider

Same name in this branch
  1. 8.9.x core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php \Drupal\Tests\link\Unit\Plugin\migrate\process\FieldLinkTest::canonicalizeUriDataProvider()
Same name in other branches
  1. 9 core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php \Drupal\Tests\link\Unit\Plugin\migrate\process\FieldLinkTest::canonicalizeUriDataProvider()
  2. 10 core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php \Drupal\Tests\link\Unit\Plugin\migrate\process\FieldLinkTest::canonicalizeUriDataProvider()
  3. 11.x core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php \Drupal\Tests\link\Unit\Plugin\migrate\process\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',
        ],
    ];
}

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