]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
test bookmark updating
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Fri, 20 Nov 2009 07:33:48 +0000 (07:33 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Fri, 20 Nov 2009 07:33:48 +0000 (07:33 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@564 b3834d28-1941-0410-a4f8-b48e95affb8f

tests/BookmarkTest.php

index 48efd7615007fb096fed2b01842017f6bb8609b9..f7d8ead58fe972ebfbe97ab2adef47a32f267252 100644 (file)
@@ -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']);
+    }
 }