X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FNetscapeBookmarkUtils%2FBookmarkImportTest.php;h=98c989bcebfa67d27ab990fd15cba7726e038535;hb=f24896b237e40718fb6eaa2869592eb0855a47fd;hp=4961aa2c4f73166d069144776cb574db9a537f67;hpb=9f32160c323e77237e4051056c1f1061586cc12e;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php b/tests/NetscapeBookmarkUtils/BookmarkImportTest.php index 4961aa2c..98c989bc 100644 --- a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php +++ b/tests/NetscapeBookmarkUtils/BookmarkImportTest.php @@ -2,7 +2,9 @@ require_once 'application/NetscapeBookmarkUtils.php'; +use Shaarli\Bookmark\LinkDB; use Shaarli\Config\ConfigManager; +use Shaarli\History; /** * Utility function to load a file's metadata in a $_FILES-like array @@ -126,6 +128,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 */