function UrlTest::providerFromInvalidInternalUri
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::providerFromInvalidInternalUri()
- 8.9.x core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::providerFromInvalidInternalUri()
- 10 core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::providerFromInvalidInternalUri()
Data provider for testFromInvalidInternalUri().
File
-
core/
tests/ Drupal/ Tests/ Core/ UrlTest.php, line 723
Class
- UrlTest
- @coversDefaultClass \Drupal\Core\Url @group UrlTest
Namespace
Drupal\Tests\CoreCode
public static function providerFromInvalidInternalUri() {
return [
// Normal paths without a leading slash.
'normal_path0' => [
'kittens',
],
'normal_path1' => [
'kittens/bengal',
],
// Path without a leading slash containing a fragment.
'fragment' => [
'kittens#feeding',
],
// Path without a leading slash containing a query string.
'without_leading_slash_query' => [
'kittens?page=1000',
],
// Paths with various token formats but no leading slash.
'path_with_tokens0' => [
'[duckies]',
],
'path_with_tokens1' => [
'%bunnies',
],
'path_with_tokens2' => [
'{{ puppies }}',
],
// Disallowed characters in the authority (host name) that are valid
// elsewhere in the path.
'disallowed_hostname_chars0' => [
'(:;2&+h^',
],
'disallowed_hostname_chars1' => [
'AKI@&hO@',
],
// Leading slash with a domain.
'leading_slash_with_domain' => [
'/http://example.com',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.