function FormattableMarkupKernelTest::providerTestFormattableMarkupUri
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php \Drupal\KernelTests\Component\Render\FormattableMarkupKernelTest::providerTestFormattableMarkupUri()
- 8.9.x core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php \Drupal\KernelTests\Component\Render\FormattableMarkupKernelTest::providerTestFormattableMarkupUri()
- 11.x core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php \Drupal\KernelTests\Component\Render\FormattableMarkupKernelTest::providerTestFormattableMarkupUri()
Return value
array
File
-
core/
tests/ Drupal/ KernelTests/ Component/ Render/ FormattableMarkupKernelTest.php, line 55
Class
- FormattableMarkupKernelTest
- Provides a test covering integration of FormattableMarkup with other systems.
Namespace
Drupal\KernelTests\Component\RenderCode
public static function providerTestFormattableMarkupUri() {
$data = [];
$data['routed-url'] = [
'Hey giraffe <a href=":url">MUUUH</a>',
'route:system.admin',
[],
'Hey giraffe <a href="/admin">MUUUH</a>',
];
$data['routed-with-query'] = [
'Hey giraffe <a href=":url">MUUUH</a>',
'route:system.admin',
[
'query' => [
'bar' => 'baz#',
],
],
'Hey giraffe <a href="/admin?bar=baz%23">MUUUH</a>',
];
$data['routed-with-fragment'] = [
'Hey giraffe <a href=":url">MUUUH</a>',
'route:system.admin',
[
'fragment' => 'bar<',
],
'Hey giraffe <a href="/admin#bar&lt;">MUUUH</a>',
];
$data['unrouted-url'] = [
'Hey giraffe <a href=":url">MUUUH</a>',
'base://foo',
[],
'Hey giraffe <a href="/foo">MUUUH</a>',
];
$data['unrouted-with-query'] = [
'Hey giraffe <a href=":url">MUUUH</a>',
'base://foo',
[
'query' => [
'bar' => 'baz#',
],
],
'Hey giraffe <a href="/foo?bar=baz%23">MUUUH</a>',
];
$data['unrouted-with-fragment'] = [
'Hey giraffe <a href=":url">MUUUH</a>',
'base://foo',
[
'fragment' => 'bar<',
],
'Hey giraffe <a href="/foo#bar&lt;">MUUUH</a>',
];
$data['mailto-protocol'] = [
'Hey giraffe <a href=":url">MUUUH</a>',
'mailto:test@example.com',
[],
'Hey giraffe <a href="mailto:test@example.com">MUUUH</a>',
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.