aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/bookmark/LinkDBTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bookmark/LinkDBTest.php')
-rw-r--r--tests/bookmark/LinkDBTest.php32
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));