summaryrefslogtreecommitdiff
path: root/tests/BookmarkTest.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-05-03 19:10:12 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-05-03 19:10:12 +0200
commitfb11021ed7eadf7443755e936cbad34fbfec7d4c (patch)
treef4229fbf74ce0472b85f1f9e07c3e27af6989e75 /tests/BookmarkTest.php
parent218ac05e712a85572afd0ed76ff969bcbe6c4b09 (diff)
downloadsemanticscuttle-fb11021ed7eadf7443755e936cbad34fbfec7d4c.tar.gz
semanticscuttle-fb11021ed7eadf7443755e936cbad34fbfec7d4c.tar.bz2
do not add bookmarks with an invalid URL
Diffstat (limited to 'tests/BookmarkTest.php')
-rw-r--r--tests/BookmarkTest.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/BookmarkTest.php b/tests/BookmarkTest.php
index e7ce488..7533f3a 100644
--- a/tests/BookmarkTest.php
+++ b/tests/BookmarkTest.php
@@ -65,7 +65,16 @@ class BookmarkTest extends TestBase
$this->assertEquals('myShortName', $bm['bShort']);
}
- public function testHardCharactersInBookmarks()
+ public function testAddBookmarkInvalidUrl()
+ {
+ $retval = $this->bs->addBookmark(
+ 'javascript:alert(123)', 'title', 'desc', 'priv',
+ 0, array()
+ );
+ $this->assertFalse($retval, 'Bookmark with invalid URL was accepted');
+ }
+
+ public function testAddBookmarkWithSpecialCharacters()
{
$bs = $this->bs;
$title = "title&é\"'(-è_çà)=";