]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/LinkDBTest.php
Merge pull request #570 from ArthurHoaro/config-manager
[github/shaarli/Shaarli.git] / tests / LinkDBTest.php
index 8ffb1512db922b33350f4b5be5c3d2a15446fdc1..9c64188f53de3f5632e36bd3a1af8c462306afeb 100644 (file)
@@ -101,7 +101,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
      * Attempt to instantiate a LinkDB whereas the datastore is not writable
      *
      * @expectedException              IOException
-     * @expectedExceptionMessageRegExp /Error accessing null/
+     * @expectedExceptionMessageRegExp /Error accessing\nnull/
      */
     public function testConstructDatastoreNotWriteable()
     {
@@ -340,6 +340,13 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
         $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('://')));
         }
     }