19 declare(strict_types=1);
32 $this->assertInstanceOf(URL::class,
new URL());
40 $this->assertSame($exptected, (
new URL())->
transform($in));
45 $this->expectException(ValueError::class);
51 $this->expectException(TypeError::class);
57 $alpha = implode(
'', range(ord(
'A'), ord(
'z')));
58 $numbers = implode(
'', range(ord(
'0'), ord(
'9')));
63 'Numbers' => $numbers,
64 'Quotes' =>
"'" .
'"',
65 'Different quotes' =>
'"Hey, y' .
"'" .
'all"',
67 'Encode entities' =>
'"hello"',
69 'HTML special chars' =>
'<>\'"&',
70 'Characters beyond ASCII value 255' =>
'Ā',
71 'Punctuation and unreserved check' =>
',._-:;',
72 'Basic control characters and null' =>
"\r\n\t\0",
77 'PHP quirks from the past' => [
'%20~%2B',
' ~+'],