ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
NormalizeTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\Uri
;
4
5
class
NormalizeTest
extends
\PHPUnit_Framework_TestCase
{
6
10
function
testNormalize
(
$in
,
$out
) {
11
12
$this->assertEquals(
13
$out
,
14
normalize
(
$in
)
15
);
16
17
}
18
19
function
normalizeData
() {
20
21
return
[
22
[
'http://example.org/'
,
'http://example.org/'
],
23
[
'HTTP://www.EXAMPLE.com/'
,
'http://www.example.com/'
],
24
[
'http://example.org/%7Eevert'
,
'http://example.org/~evert'
],
25
[
'http://example.org/./evert'
,
'http://example.org/evert'
],
26
[
'http://example.org/../evert'
,
'http://example.org/evert'
],
27
[
'http://example.org/foo/../evert'
,
'http://example.org/evert'
],
28
[
'/%41'
,
'/A'
],
29
[
'/%3F'
,
'/%3F'
],
30
[
'/%3f'
,
'/%3F'
],
31
[
'http://example.org'
,
'http://example.org/'
],
32
[
'http://example.org:/'
,
'http://example.org/'
],
33
[
'http://example.org:80/'
,
'http://example.org/'
],
34
// See issue #6. parse_url corrupts strings like this, but only on
35
// macs.
36
//[ 'http://example.org/有词法别名.zh','http://example.org/%E6%9C%89%E8%AF%8D%E6%B3%95%E5%88%AB%E5%90%8D.zh'],
37
38
];
39
40
}
41
42
}
Sabre\Uri\NormalizeTest
Definition:
NormalizeTest.php:5
PHPUnit_Framework_TestCase
$out
$out
Definition:
UtfNormalGenerate.php:178
Sabre\Uri\NormalizeTest\testNormalize
testNormalize($in, $out)
normalizeData
Definition:
NormalizeTest.php:10
Sabre\Uri\NormalizeTest\normalizeData
normalizeData()
Definition:
NormalizeTest.php:19
Sabre\Uri
Definition:
functions.php:3
$in
if(php_sapi_name() !='cli') $in
Definition:
Utf8Test.php:37
php
Sabre\Uri\normalize
normalize($uri)
Takes a URI or partial URI as its argument, and normalizes it.
Definition:
functions.php:114
libs
composer
vendor
sabre
uri
tests
NormalizeTest.php
Generated on Thu Jan 16 2025 19:01:53 for ILIAS by
1.8.13 (using
Doxyfile
)