aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Url
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Url')
-rw-r--r--tests/Url/UrlTest.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/Url/UrlTest.php b/tests/Url/UrlTest.php
index a64a73ea..4bf53b2d 100644
--- a/tests/Url/UrlTest.php
+++ b/tests/Url/UrlTest.php
@@ -85,6 +85,7 @@ class UrlTest extends PHPUnit_Framework_TestCase
85 $this->assertUrlIsCleaned('?utm_term=1n4l'); 85 $this->assertUrlIsCleaned('?utm_term=1n4l');
86 86
87 $this->assertUrlIsCleaned('?xtor=some-url'); 87 $this->assertUrlIsCleaned('?xtor=some-url');
88 $this->assertUrlIsCleaned('?PHPSESSID=012345678910111213');
88 } 89 }
89 90
90 /** 91 /**
@@ -181,4 +182,19 @@ class UrlTest extends PHPUnit_Framework_TestCase
181 $url = new Url('ftp://save.tld/mysave'); 182 $url = new Url('ftp://save.tld/mysave');
182 $this->assertFalse($url->isHttp()); 183 $this->assertFalse($url->isHttp());
183 } 184 }
185
186 /**
187 * Test IndToAscii.
188 */
189 function testIndToAscii()
190 {
191 $ind = 'http://www.académie-française.fr/';
192 $expected = 'http://www.xn--acadmie-franaise-npb1a.fr/';
193 $url = new Url($ind);
194 $this->assertEquals($expected, $url->idnToAscii());
195
196 $notInd = 'http://www.academie-francaise.fr/';
197 $url = new Url($notInd);
198 $this->assertEquals($notInd, $url->idnToAscii());
199 }
184} 200}