Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit e9c1c07

Browse files
committed
Add failing testcase for UTF-8 query string
1 parent a60da17 commit e9c1c07

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/UriTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,24 @@ public function utf8PathsDataProvider()
588588
];
589589
}
590590

591+
/**
592+
* @dataProvider utf8QueryStringsDataProvider
593+
*/
594+
public function testUtf8Query($url, $result)
595+
{
596+
$uri = new Uri($url);
597+
598+
$this->assertEquals($result, $uri->getQuery());
599+
}
600+
601+
public function utf8QueryStringsDataProvider()
602+
{
603+
return [
604+
['http://example.com/?q=тестовый_путь', 'q=тестовый_путь'],
605+
['http://example.com/?q=ουτοπία', 'q=ουτοπία'],
606+
];
607+
}
608+
591609
public function testUriDoesNotAppendColonToHostIfPortIsEmpty()
592610
{
593611
$uri = (new Uri())->withHost('google.com');

0 commit comments

Comments
 (0)