+
+ /**
+ * Do not prepend notes with the Shaarli index's URL
+ */
+ public function testFilterAndFormatDoNotPrependNoteUrl()
+ {
+ $links = NetscapeBookmarkUtils::filterAndFormat(self::$linkDb, 'public', false, '');
+ $this->assertEquals(
+ '?WDWyig',
+ $links[0]['url']
+ );
+ }
+
+ /**
+ * Prepend notes with the Shaarli index's URL
+ */
+ public function testFilterAndFormatPrependNoteUrl()
+ {
+ $indexUrl = 'http://localhost:7469/shaarli/';
+ $links = NetscapeBookmarkUtils::filterAndFormat(
+ self::$linkDb,
+ 'public',
+ true,
+ $indexUrl
+ );
+ $this->assertEquals(
+ $indexUrl . '?WDWyig',
+ $links[0]['url']
+ );
+ }