diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-04-06 22:00:52 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-05-03 19:51:29 +0200 |
commit | ce7b0b6480aa854ee6893f5c889277b0e3b13efc (patch) | |
tree | 8d8beb4ea5568d9989a5ebf52e2adc542e17f74e /tests/Url | |
parent | 11609d9fd8ba53f049e6c913d8e3affab6cfc9ce (diff) | |
download | Shaarli-ce7b0b6480aa854ee6893f5c889277b0e3b13efc.tar.gz Shaarli-ce7b0b6480aa854ee6893f5c889277b0e3b13efc.tar.zst Shaarli-ce7b0b6480aa854ee6893f5c889277b0e3b13efc.zip |
Fixes #531 - Title retrieving is failing with multiple use case
see https://github.com/shaarli/Shaarli/issues/531 for details
Diffstat (limited to 'tests/Url')
-rw-r--r-- | tests/Url/UrlTest.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/Url/UrlTest.php b/tests/Url/UrlTest.php index a64a73ea..5fdc8617 100644 --- a/tests/Url/UrlTest.php +++ b/tests/Url/UrlTest.php | |||
@@ -181,4 +181,19 @@ class UrlTest extends PHPUnit_Framework_TestCase | |||
181 | $url = new Url('ftp://save.tld/mysave'); | 181 | $url = new Url('ftp://save.tld/mysave'); |
182 | $this->assertFalse($url->isHttp()); | 182 | $this->assertFalse($url->isHttp()); |
183 | } | 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->indToAscii()); | ||
194 | |||
195 | $notInd = 'http://www.academie-francaise.fr/'; | ||
196 | $url = new Url($notInd); | ||
197 | $this->assertEquals($notInd, $url->indToAscii()); | ||
198 | } | ||
184 | } | 199 | } |