aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Url/UrlTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Url/UrlTest.php')
-rw-r--r--tests/Url/UrlTest.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/Url/UrlTest.php b/tests/Url/UrlTest.php
index 425327ed..ce82265e 100644
--- a/tests/Url/UrlTest.php
+++ b/tests/Url/UrlTest.php
@@ -128,6 +128,13 @@ class UrlTest extends PHPUnit_Framework_TestCase
128 self::$baseUrl.'?my=stuff&is=kept#again', 128 self::$baseUrl.'?my=stuff&is=kept#again',
129 $url->cleanup() 129 $url->cleanup()
130 ); 130 );
131
132 // test firefox reader url
133 $url = new Url(
134 'about://reader?url=' . urlencode(self::$baseUrl .'?my=stuff&is=kept')
135 );
136 $this->assertEquals(self::$baseUrl.'?my=stuff&is=kept', $url->cleanup());
137
131 } 138 }
132 139
133 /** 140 /**
@@ -174,4 +181,19 @@ class UrlTest extends PHPUnit_Framework_TestCase
174 $url = new Url('ftp://save.tld/mysave'); 181 $url = new Url('ftp://save.tld/mysave');
175 $this->assertFalse($url->isHttp()); 182 $this->assertFalse($url->isHttp());
176 } 183 }
184
185 /**
186 * Test IndToAscii.
187 */
188 function testIndToAscii()
189 {
190 $ind = 'http://www.académie-française.fr/';
191 $expected = 'http://www.xn--acadmie-franaise-npb1a.fr/';
192 $url = new Url($ind);
193 $this->assertEquals($expected, $url->idnToAscii());
194
195 $notInd = 'http://www.academie-francaise.fr/';
196 $url = new Url($notInd);
197 $this->assertEquals($notInd, $url->idnToAscii());
198 }
177} 199}