]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/NetscapeBookmarkUtils/BookmarkImportTest.php
Ignore the case while checking DOCTYPE during the file import
[github/shaarli/Shaarli.git] / tests / NetscapeBookmarkUtils / BookmarkImportTest.php
index 4961aa2c4f73166d069144776cb574db9a537f67..f0a958cb2e71fed3cd747ef10f906b38b82efc1b 100644 (file)
@@ -126,6 +126,21 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
         $this->assertEquals(0, count($this->linkDb));
     }
 
+    /**
+     * Attempt to import bookmarks from a file with a lowercase Doctype
+     */
+    public function testImportLowecaseDoctype()
+    {
+        $files = file2array('lowercase_doctype.htm');
+        $this->assertStringMatchesFormat(
+            'File lowercase_doctype.htm (386 bytes) was successfully processed in %d seconds:'
+            .' 2 links imported, 0 links overwritten, 0 links skipped.',
+            NetscapeBookmarkUtils::import(null, $files, $this->linkDb, $this->conf, $this->history)
+        );
+        $this->assertEquals(2, count($this->linkDb));
+    }
+
+
     /**
      * Ensure IE dumps are supported
      */