You are here

public function UrlTest::providerFromInvalidInternalUri in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 729
Contains \Drupal\Tests\Core\UrlTest.

Class

UrlTest
@coversDefaultClass \Drupal\Core\Url @group UrlTest

Namespace

Drupal\Tests\Core

Code

public 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',
    ],
  ];
}