You are here

public function HtmlTest::providerTestTransformRootRelativeUrlsToAbsoluteAssertion in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::providerTestTransformRootRelativeUrlsToAbsoluteAssertion()
  2. 10 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 395

Class

HtmlTest
Tests \Drupal\Component\Utility\Html.

Namespace

Drupal\Tests\Component\Utility

Code

public 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',
    ],
  ];
}