summaryrefslogtreecommitdiff
path: root/tests/BookmarkTest.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-11-20 07:33:48 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-11-20 07:33:48 +0000
commit258fc8edc5921a2511f871603f84405881c9d706 (patch)
treec3b6c9e1255980ea1d9fc0cad7654cf8c506e45f /tests/BookmarkTest.php
parent7431f632a43877705a80aa697d8d066959f181e8 (diff)
downloadsemanticscuttle-258fc8edc5921a2511f871603f84405881c9d706.tar.gz
semanticscuttle-258fc8edc5921a2511f871603f84405881c9d706.tar.bz2
test bookmark updating
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@564 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'tests/BookmarkTest.php')
-rw-r--r--tests/BookmarkTest.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/BookmarkTest.php b/tests/BookmarkTest.php
index 48efd76..f7d8ead 100644
--- a/tests/BookmarkTest.php
+++ b/tests/BookmarkTest.php
@@ -652,6 +652,35 @@ class BookmarkTest extends TestBase
);
}
+
+
+ /**
+ * test if updating an existing bookmark works
+ */
+ public function testUpdateBookmark()
+ {
+ $bid = $this->addBookmark();
+ $this->assertTrue(
+ $this->bs->updateBookmark(
+ $bid,
+ 'http://example.org/foo',
+ 'my new title',
+ 'new description',
+ 'new private note',
+ 1,
+ array('new')
+ )
+ );
+ $bm = $this->bs->getBookmark($bid, true);
+ $this->assertEquals('http://example.org/foo', $bm['bAddress']);
+ $this->assertEquals('my new title', $bm['bTitle']);
+ $this->assertEquals('new description', $bm['bDescription']);
+ $this->assertEquals('new private note', $bm['bPrivateNote']);
+ $this->assertEquals(1, $bm['bStatus']);
+ $this->assertType('array', $bm['tags']);
+ $this->assertEquals(1, count($bm['tags']));
+ $this->assertContains('new', $bm['tags']);
+ }
}