summaryrefslogtreecommitdiff
path: root/tests/BookmarkTest.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-05-12 19:25:03 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-05-12 19:25:03 +0200
commit88d7b9631b444cef28115fb8e0bae736b45e557e (patch)
tree9c676c98dbface055c68df2731f3a7482dae465b /tests/BookmarkTest.php
parentfc093a5fe51d35a2991e549e8836cac15dc2888b (diff)
parentb57c8d4581b05cd70a363cacd37f9ffc7da785d8 (diff)
downloadsemanticscuttle-88d7b9631b444cef28115fb8e0bae736b45e557e.tar.gz
semanticscuttle-88d7b9631b444cef28115fb8e0bae736b45e557e.tar.bz2
Merge branch 'master' into configurable-privacy2
Diffstat (limited to 'tests/BookmarkTest.php')
-rw-r--r--tests/BookmarkTest.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/BookmarkTest.php b/tests/BookmarkTest.php
index e7ce488..b50dab2 100644
--- a/tests/BookmarkTest.php
+++ b/tests/BookmarkTest.php
@@ -50,8 +50,6 @@ class BookmarkTest extends TestBase
/**
* Tests if adding a bookmark with short url name
* saves it in the database.
- *
- * @return void
*/
public function testAddBookmarkShort()
{
@@ -65,7 +63,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&é\"'(-è_çà)=";
@@ -95,7 +102,7 @@ class BookmarkTest extends TestBase
);
}
- public function testUnificationOfBookmarks()
+ public function testAddBookmarkUnification()
{
$bs = $this->bs;