You are here

public function UriTest::pathTestProvider in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/tests/UriTest.php \GuzzleHttp\Tests\Psr7\UriTest::pathTestProvider()

File

vendor/guzzlehttp/psr7/tests/UriTest.php, line 200

Class

UriTest
@covers GuzzleHttp\Psr7\Uri

Namespace

GuzzleHttp\Tests\Psr7

Code

public function pathTestProvider() {
  return [
    // Percent encode spaces.
    [
      'http://foo.com/baz bar',
      'http://foo.com/baz%20bar',
    ],
    // Don't encoding something that's already encoded.
    [
      'http://foo.com/baz%20bar',
      'http://foo.com/baz%20bar',
    ],
    // Percent encode invalid percent encodings
    [
      'http://foo.com/baz%2-bar',
      'http://foo.com/baz%252-bar',
    ],
    // Don't encode path segments
    [
      'http://foo.com/baz/bar/bam?a',
      'http://foo.com/baz/bar/bam?a',
    ],
    [
      'http://foo.com/baz+bar',
      'http://foo.com/baz+bar',
    ],
    [
      'http://foo.com/baz:bar',
      'http://foo.com/baz:bar',
    ],
    [
      'http://foo.com/baz@bar',
      'http://foo.com/baz@bar',
    ],
    [
      'http://foo.com/baz(bar);bam/',
      'http://foo.com/baz(bar);bam/',
    ],
    [
      'http://foo.com/a-zA-Z0-9.-_~!$&\'()*+,;=:@',
      'http://foo.com/a-zA-Z0-9.-_~!$&\'()*+,;=:@',
    ],
  ];
}