]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/bookmark/LinkDBTest.php
Remove the redirector setting
[github/shaarli/Shaarli.git] / tests / bookmark / LinkDBTest.php
index 65409e956b3f38afb826914c109f6f3f44a8a42e..2990a6b56a0360756b3b8ee157fc7125e4372a21 100644 (file)
@@ -6,7 +6,6 @@
 namespace Shaarli\Bookmark;
 
 use DateTime;
-use Shaarli\Bookmark\Exception\LinkNotFoundException;
 use ReferenceLinkDB;
 use ReflectionClass;
 use Shaarli;
@@ -362,36 +361,6 @@ class LinkDBTest extends \PHPUnit\Framework\TestCase
         );
     }
 
-    /**
-     * Test real_url without redirector.
-     */
-    public function testLinkRealUrlWithoutRedirector()
-    {
-        $db = new LinkDB(self::$testDatastore, false, false);
-        foreach ($db as $link) {
-            $this->assertEquals($link['url'], $link['real_url']);
-        }
-    }
-
-    /**
-     * Test real_url with redirector.
-     */
-    public function testLinkRealUrlWithRedirector()
-    {
-        $redirector = 'http://redirector.to?';
-        $db = new LinkDB(self::$testDatastore, false, false, $redirector);
-        foreach ($db as $link) {
-            $this->assertStringStartsWith($redirector, $link['real_url']);
-            $this->assertNotFalse(strpos($link['real_url'], urlencode('://')));
-        }
-
-        $db = new LinkDB(self::$testDatastore, false, false, $redirector, false);
-        foreach ($db as $link) {
-            $this->assertStringStartsWith($redirector, $link['real_url']);
-            $this->assertFalse(strpos($link['real_url'], urlencode('://')));
-        }
-    }
-
     /**
      * Test filter with string.
      */
@@ -517,7 +486,7 @@ class LinkDBTest extends \PHPUnit\Framework\TestCase
     public function testRenameTagCaseSensitive()
     {
         self::$refDB->write(self::$testDatastore);
-        $linkDB = new LinkDB(self::$testDatastore, true, false, '');
+        $linkDB = new LinkDB(self::$testDatastore, true, false);
 
         $res = $linkDB->renameTag('sTuff', 'Taz');
         $this->assertEquals(1, count($res));