Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1821284
NormalizeTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
1 KB
Subscribers
None
NormalizeTest.php
View Options
<?php
namespace
Sabre\Uri
;
class
NormalizeTest
extends
\PHPUnit_Framework_TestCase
{
/**
* @dataProvider normalizeData
*/
function
testNormalize
(
$in
,
$out
)
{
$this
->
assertEquals
(
$out
,
normalize
(
$in
)
);
}
function
normalizeData
()
{
return
[
[
'http://example.org/'
,
'http://example.org/'
],
[
'HTTP://www.EXAMPLE.com/'
,
'http://www.example.com/'
],
[
'http://example.org/%7Eevert'
,
'http://example.org/~evert'
],
[
'http://example.org/./evert'
,
'http://example.org/evert'
],
[
'http://example.org/../evert'
,
'http://example.org/evert'
],
[
'http://example.org/foo/../evert'
,
'http://example.org/evert'
],
[
'/%41'
,
'/A'
],
[
'/%3F'
,
'/%3F'
],
[
'/%3f'
,
'/%3F'
],
[
'http://example.org'
,
'http://example.org/'
],
[
'http://example.org:/'
,
'http://example.org/'
],
[
'http://example.org:80/'
,
'http://example.org/'
],
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Dec 23, 2:47 PM (6 h, 30 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
915662
Default Alt Text
NormalizeTest.php (1 KB)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment