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

@covers ::transformRootRelativeUrlsToAbsolute @dataProvider providerTestTransformRootRelativeUrlsToAbsolute

File

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

Class

HtmlTest
Tests \Drupal\Component\Utility\Html.

Namespace

Drupal\Tests\Component\Utility

Code

public function testTransformRootRelativeUrlsToAbsolute($html, $scheme_and_host, $expected_html) {
  $this
    ->assertSame($expected_html ?: $html, Html::transformRootRelativeUrlsToAbsolute($html, $scheme_and_host));
}