function FormattableMarkupKernelTest::testFormattableMarkupUri

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php \Drupal\KernelTests\Component\Render\FormattableMarkupKernelTest::testFormattableMarkupUri()
  2. 8.9.x core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php \Drupal\KernelTests\Component\Render\FormattableMarkupKernelTest::testFormattableMarkupUri()
  3. 11.x core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php \Drupal\KernelTests\Component\Render\FormattableMarkupKernelTest::testFormattableMarkupUri()

Tests URL ":placeholders" in \Drupal\Component\Render\FormattableMarkup.

@dataProvider providerTestFormattableMarkupUri

File

core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php, line 47

Class

FormattableMarkupKernelTest
Provides a test covering integration of FormattableMarkup with other systems.

Namespace

Drupal\KernelTests\Component\Render

Code

public function testFormattableMarkupUri($string, $uri, $options, $expected) : void {
    $args = self::getFormattableMarkupUriArgs($uri, $options);
    $this->assertSame($expected, (string) new FormattableMarkup($string, $args));
}

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