test: add test for URI path

This commit is contained in:
kenjis 2024-03-24 08:50:23 +09:00
parent 7ef2161ccf
commit 01a5624238
No known key found for this signature in database
GPG Key ID: BD254878922AF198

View File

@ -473,8 +473,8 @@ final class URITest extends CIUnitTestCase
{
return [
'dot-segment' => [
'/./path/to/nowhere',
'/path/to/nowhere',
'/./path/to/nowhere', // path
'/path/to/nowhere', // expectedPath
],
'double-dots' => [
'/../path/to/nowhere',
@ -488,22 +488,26 @@ final class URITest extends CIUnitTestCase
'../path/to/nowhere',
'/path/to/nowhere',
],
'decoded' => [
'decode-percent-encoded-chars' => [
'/%41path',
'/Apath',
],
'decode-slash' => [
'/a%2Fb',
'/a/b',
],
'encode-unreserved-chars' => [
'/path^here',
'/path%5Ehere',
],
'encode-invalid-percent-encoding' => [
'/pa%2-th',
'/pa%252-th',
],
'encode-multibyte-chars' => [
'/あいう',
'/%E3%81%82%E3%81%84%E3%81%86',
],
'encode-invalid-percent-encoding' => [
'/pa%2-th',
'/pa%252-th',
],
];
}