+ /**
+ * Ensure IE dumps are supported
+ */
+ public function testImportInternetExplorerEncoding()
+ {
+ $files = file2array('internet_explorer_encoding.htm');
+ $this->assertEquals(
+ 'File internet_explorer_encoding.htm (356 bytes) was successfully processed:'
+ .' 1 links imported, 0 links overwritten, 0 links skipped.',
+ NetscapeBookmarkUtils::import(array(), $files, $this->linkDb, $this->pagecache)
+ );
+ $this->assertEquals(1, count($this->linkDb));
+ $this->assertEquals(0, count_private($this->linkDb));
+
+ $this->assertEquals(
+ array(
+ 'id' => 0,
+ 'created' => DateTime::createFromFormat('Ymd_His', '20160618_203944'),
+ 'title' => 'Hg Init a Mercurial tutorial by Joel Spolsky',
+ 'url' => 'http://hginit.com/',
+ 'description' => '',
+ 'private' => 0,
+ 'tags' => '',
+ 'shorturl' => 'La37cg',
+ ),
+ $this->linkDb->getLinkFromUrl('http://hginit.com/')
+ );
+ }
+