summaryrefslogtreecommitdiff
path: root/tests/BookmarkTest.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-09-23 07:34:05 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-09-23 07:34:05 +0000
commitb17e8f940c8008b034e4db477f748a1f7e4eddb6 (patch)
treed243c5b4b581546f6d9aaea338536efc49000dfa /tests/BookmarkTest.php
parentea4c9fa4f741007b575a9437a0c0a642d1398c1d (diff)
downloadsemanticscuttle-b17e8f940c8008b034e4db477f748a1f7e4eddb6.tar.gz
semanticscuttle-b17e8f940c8008b034e4db477f748a1f7e4eddb6.tar.bz2
Fix bug #3073215: Updating bookmark time does not work
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@745 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'tests/BookmarkTest.php')
-rw-r--r--tests/BookmarkTest.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/BookmarkTest.php b/tests/BookmarkTest.php
index 40b40e3..c836d5e 100644
--- a/tests/BookmarkTest.php
+++ b/tests/BookmarkTest.php
@@ -982,6 +982,38 @@ class BookmarkTest extends TestBase
$this->assertEquals('newShortNambb', $bm['bShort']);
}
+ /**
+ * Tests if updating a bookmark's date works.
+ * This once was a bug, see bug #3073215.
+ *
+ * @return void
+ *
+ * @link https://sourceforge.net/tracker/?func=detail&atid=1017430&aid=3073215&group_id=211356
+ */
+ public function testUpdateBookmarkDate()
+ {
+ $bid = $this->bs->addBookmark(
+ 'http://example.org', 'title', 'desc', 'priv',
+ 0, array(), 'myShortName'
+ );
+ $bm = $this->bs->getBookmark($bid);
+ $this->assertEquals('myShortName', $bm['bShort']);
+
+ $this->assertTrue(
+ $this->bs->updateBookmark(
+ $bid, 'http://example2.org', 'my title', 'desc',
+ 'priv', 0, array(), 'newShortNambb',
+ //we need to use zulu (GMT) time zone here
+ // since the dates/times are stored as that
+ // in the database
+ '2002-03-04T05:06:07Z'
+ )
+ );
+ $bm = $this->bs->getBookmark($bid);
+ $this->assertEquals('newShortNambb', $bm['bShort']);
+ $this->assertEquals('2002-03-04 05:06:07', $bm['bDatetime']);
+ }
+
/**