You are here

protected static function FormattableMarkupKernelTest::getFormattableMarkupUriArgs in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php \Drupal\KernelTests\Component\Render\FormattableMarkupKernelTest::getFormattableMarkupUriArgs()
  2. 9 core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php \Drupal\KernelTests\Component\Render\FormattableMarkupKernelTest::getFormattableMarkupUriArgs()

Gets arguments for FormattableMarkup based on Url::fromUri() parameters.

Parameters

string $uri: The URI of the resource.

array $options: The options to pass to Url::fromUri().

Return value

array Array containing:

  • ':url': A URL string.

See also

\Drupal\Component\Render\FormattableMarkup

File

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

Class

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

Namespace

Drupal\KernelTests\Component\Render

Code

protected static function getFormattableMarkupUriArgs($uri, $options = []) {
  $args[':url'] = Url::fromUri($uri, $options)
    ->toString();
  return $args;
}