diff options
author | Arthur <arthur@hoa.ro> | 2016-04-09 16:55:39 +0200 |
---|---|---|
committer | Arthur <arthur@hoa.ro> | 2016-04-09 16:55:39 +0200 |
commit | 9ad2950debf1d9e4528700854cf7c02daac9636d (patch) | |
tree | 83a40e1f0096059bd9c7c13efbcfdeaa0ea06b5e /tests/LinkDBTest.php | |
parent | 9486a2e92911c726673fe50674a0a408be3c774f (diff) | |
parent | 043eae70c4c57b0447b56a58b64ce9d102895396 (diff) | |
download | Shaarli-9ad2950debf1d9e4528700854cf7c02daac9636d.tar.gz Shaarli-9ad2950debf1d9e4528700854cf7c02daac9636d.tar.zst Shaarli-9ad2950debf1d9e4528700854cf7c02daac9636d.zip |
Merge pull request #524 from ArthurHoaro/hotfix/redirectorurl
Fixes #480: add an option to urlencode redirector URL
Diffstat (limited to 'tests/LinkDBTest.php')
-rw-r--r-- | tests/LinkDBTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php index 52d31400..b055fe91 100644 --- a/tests/LinkDBTest.php +++ b/tests/LinkDBTest.php | |||
@@ -338,6 +338,13 @@ class LinkDBTest extends PHPUnit_Framework_TestCase | |||
338 | $db = new LinkDB(self::$testDatastore, false, false, $redirector); | 338 | $db = new LinkDB(self::$testDatastore, false, false, $redirector); |
339 | foreach($db as $link) { | 339 | foreach($db as $link) { |
340 | $this->assertStringStartsWith($redirector, $link['real_url']); | 340 | $this->assertStringStartsWith($redirector, $link['real_url']); |
341 | $this->assertNotFalse(strpos($link['real_url'], urlencode('://'))); | ||
342 | } | ||
343 | |||
344 | $db = new LinkDB(self::$testDatastore, false, false, $redirector, false); | ||
345 | foreach($db as $link) { | ||
346 | $this->assertStringStartsWith($redirector, $link['real_url']); | ||
347 | $this->assertFalse(strpos($link['real_url'], urlencode('://'))); | ||
341 | } | 348 | } |
342 | } | 349 | } |
343 | 350 | ||