diff options
Diffstat (limited to 'tests/NetscapeBookmarkUtils/BookmarkImportTest.php')
-rw-r--r-- | tests/NetscapeBookmarkUtils/BookmarkImportTest.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php b/tests/NetscapeBookmarkUtils/BookmarkImportTest.php index 2d4e7557..f0ad500f 100644 --- a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php +++ b/tests/NetscapeBookmarkUtils/BookmarkImportTest.php | |||
@@ -83,6 +83,34 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase | |||
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * Ensure IE dumps are supported | ||
87 | */ | ||
88 | public function testImportInternetExplorerEncoding() | ||
89 | { | ||
90 | $files = file2array('internet_explorer_encoding.htm'); | ||
91 | $this->assertEquals( | ||
92 | 'File internet_explorer_encoding.htm (356 bytes) was successfully processed:' | ||
93 | .' 1 links imported, 0 links overwritten, 0 links skipped.', | ||
94 | NetscapeBookmarkUtils::import(array(), $files, $this->linkDb, $this->pagecache) | ||
95 | ); | ||
96 | $this->assertEquals(1, count($this->linkDb)); | ||
97 | $this->assertEquals(0, count_private($this->linkDb)); | ||
98 | |||
99 | $this->assertEquals( | ||
100 | array( | ||
101 | 'linkdate' => '20160618_173944', | ||
102 | 'title' => 'Hg Init a Mercurial tutorial by Joel Spolsky', | ||
103 | 'url' => 'http://hginit.com/', | ||
104 | 'description' => '', | ||
105 | 'private' => 0, | ||
106 | 'tags' => '' | ||
107 | ), | ||
108 | $this->linkDb->getLinkFromUrl('http://hginit.com/') | ||
109 | ); | ||
110 | } | ||
111 | |||
112 | |||
113 | /** | ||
86 | * Import bookmarks nested in a folder hierarchy | 114 | * Import bookmarks nested in a folder hierarchy |
87 | */ | 115 | */ |
88 | public function testImportNested() | 116 | public function testImportNested() |