function HtmlTest::providerTestTransformRootRelativeUrlsToAbsoluteAssertion

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::providerTestTransformRootRelativeUrlsToAbsoluteAssertion()
  2. 8.9.x core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::providerTestTransformRootRelativeUrlsToAbsoluteAssertion()
  3. 11.x core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::providerTestTransformRootRelativeUrlsToAbsoluteAssertion()

Provides test data for testTransformRootRelativeUrlsToAbsoluteAssertion().

Return value

array Test data.

File

core/tests/Drupal/Tests/Component/Utility/HtmlTest.php, line 412

Class

HtmlTest
Tests \Drupal\Component\Utility\Html.

Namespace

Drupal\Tests\Component\Utility

Code

public static function providerTestTransformRootRelativeUrlsToAbsoluteAssertion() {
    return [
        'only relative path' => [
            'llama',
        ],
        'only root-relative path' => [
            '/llama',
        ],
        'host and path' => [
            'example.com/llama',
        ],
        'scheme, host and path' => [
            'http://example.com/llama',
        ],
    ];
}

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