ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
NormalizeTest.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\Uri;
4 
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 }
testNormalize($in, $out)
normalizeData
if(php_sapi_name() !='cli') $in
Definition: Utf8Test.php:37
normalize($uri)
Takes a URI or partial URI as its argument, and normalizes it.
Definition: functions.php:114