public function FormattableMarkupKernelTest::providerTestFormattableMarkupUri in Drupal 8
Same name and namespace in other branches
- 9 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 62
Class
- FormattableMarkupKernelTest
- Provides a test covering integration of FormattableMarkup with other systems.
Namespace
Drupal\KernelTests\Component\RenderCode
public 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;
}