diff options
author | ArthurHoaro <arthur@hoa.ro> | 2019-02-24 11:29:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-24 11:29:56 +0100 |
commit | 015314f3c6a1ce0b2c45fdb2fb0d36a15cab10f5 (patch) | |
tree | c805547e171afd615b90486fa8bd7656f5fb9090 /tests/bookmark/LinkDBTest.php | |
parent | 0ee11e93907f0132e3b25a185093047bcd6b141d (diff) | |
parent | 520d29578c57e476ece3bdd20c286d196b7b61b4 (diff) | |
download | Shaarli-015314f3c6a1ce0b2c45fdb2fb0d36a15cab10f5.tar.gz Shaarli-015314f3c6a1ce0b2c45fdb2fb0d36a15cab10f5.tar.zst Shaarli-015314f3c6a1ce0b2c45fdb2fb0d36a15cab10f5.zip |
Merge pull request #1269 from ArthurHoaro/feature/remove-redirector
Remove the redirector setting
Diffstat (limited to 'tests/bookmark/LinkDBTest.php')
-rw-r--r-- | tests/bookmark/LinkDBTest.php | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/tests/bookmark/LinkDBTest.php b/tests/bookmark/LinkDBTest.php index ff5c0b97..2990a6b5 100644 --- a/tests/bookmark/LinkDBTest.php +++ b/tests/bookmark/LinkDBTest.php | |||
@@ -362,36 +362,6 @@ class LinkDBTest extends \PHPUnit\Framework\TestCase | |||
362 | } | 362 | } |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * Test real_url without redirector. | ||
366 | */ | ||
367 | public function testLinkRealUrlWithoutRedirector() | ||
368 | { | ||
369 | $db = new LinkDB(self::$testDatastore, false, false); | ||
370 | foreach ($db as $link) { | ||
371 | $this->assertEquals($link['url'], $link['real_url']); | ||
372 | } | ||
373 | } | ||
374 | |||
375 | /** | ||
376 | * Test real_url with redirector. | ||
377 | */ | ||
378 | public function testLinkRealUrlWithRedirector() | ||
379 | { | ||
380 | $redirector = 'http://redirector.to?'; | ||
381 | $db = new LinkDB(self::$testDatastore, false, false, $redirector); | ||
382 | foreach ($db as $link) { | ||
383 | $this->assertStringStartsWith($redirector, $link['real_url']); | ||
384 | $this->assertNotFalse(strpos($link['real_url'], urlencode('://'))); | ||
385 | } | ||
386 | |||
387 | $db = new LinkDB(self::$testDatastore, false, false, $redirector, false); | ||
388 | foreach ($db as $link) { | ||
389 | $this->assertStringStartsWith($redirector, $link['real_url']); | ||
390 | $this->assertFalse(strpos($link['real_url'], urlencode('://'))); | ||
391 | } | ||
392 | } | ||
393 | |||
394 | /** | ||
395 | * Test filter with string. | 365 | * Test filter with string. |
396 | */ | 366 | */ |
397 | public function testFilterString() | 367 | public function testFilterString() |
@@ -516,7 +486,7 @@ class LinkDBTest extends \PHPUnit\Framework\TestCase | |||
516 | public function testRenameTagCaseSensitive() | 486 | public function testRenameTagCaseSensitive() |
517 | { | 487 | { |
518 | self::$refDB->write(self::$testDatastore); | 488 | self::$refDB->write(self::$testDatastore); |
519 | $linkDB = new LinkDB(self::$testDatastore, true, false, ''); | 489 | $linkDB = new LinkDB(self::$testDatastore, true, false); |
520 | 490 | ||
521 | $res = $linkDB->renameTag('sTuff', 'Taz'); | 491 | $res = $linkDB->renameTag('sTuff', 'Taz'); |
522 | $this->assertEquals(1, count($res)); | 492 | $this->assertEquals(1, count($res)); |