function UnroutedUrlTest::providerFromInvalidUri

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/UnroutedUrlTest.php \Drupal\Tests\Core\UnroutedUrlTest::providerFromInvalidUri()
  2. 10 core/tests/Drupal/Tests/Core/UnroutedUrlTest.php \Drupal\Tests\Core\UnroutedUrlTest::providerFromInvalidUri()
  3. 11.x core/tests/Drupal/Tests/Core/UnroutedUrlTest.php \Drupal\Tests\Core\UnroutedUrlTest::providerFromInvalidUri()

Data provider for testFromInvalidUri().

File

core/tests/Drupal/Tests/Core/UnroutedUrlTest.php, line 113

Class

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

Namespace

Drupal\Tests\Core

Code

public function providerFromInvalidUri() {
    return [
        // Schemeless paths.
[
            'test',
        ],
        [
            '/test',
        ],
        // Schemeless path with a query string.
[
            'foo?bar',
        ],
        // Only a query string.
[
            '?bar',
        ],
        // Only a fragment.
[
            '#foo',
        ],
        // Disallowed characters in the authority (host name) that are valid
        // elsewhere in the path.
[
            'base://(:;2&+h^',
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.