]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Altered tests to be more timezone friendly
authorMark Pemberton <mpemberton5@gmail.com>
Sun, 22 May 2011 02:06:44 +0000 (22:06 -0400)
committerMark Pemberton <mpemberton5@gmail.com>
Sun, 22 May 2011 02:06:44 +0000 (22:06 -0400)
src/SemanticScuttle/Service/Bookmark.php
tests/Api/PostsAddTest.php
tests/Bookmark2TagTest.php

index 17ab7badcbd1df8dc56d9c9e6274a1f64006c00d..f69b4d12bedde0c556821dd9ec2a9cd3b3f7a855 100644 (file)
@@ -486,7 +486,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
         } else {
             $time = strtotime($date);
         }
-        $datetime = gmdate('Y-m-d H:i:s', $time);
+        $datetime = date('Y-m-d H:i:s', $time);
 
         if ($short === '') {
             $short = null;
index e6d053112d9293a3a80fc9c983e61f898bdb0e17..2613a8725198083d55ca9d9d98913fc5e07cfca0 100644 (file)
@@ -111,7 +111,7 @@ TXT;
         $this->assertEquals($bmDescription, stripslashes($bm['bDescription']));
         $this->assertEquals($bmTags, $bm['tags']);
         $this->assertEquals(
-            gmdate('Y-m-d H:i:s', strtotime($bmDatetime)),
+            date('Y-m-d H:i:s', strtotime($bmDatetime)),
             $bm['bDatetime']
         );
     }
@@ -173,7 +173,7 @@ TXT;
         $this->assertEquals($bmDescription, stripslashes($bm['bDescription']));
         $this->assertEquals($bmTags, $bm['tags']);
         $this->assertEquals(
-            gmdate('Y-m-d H:i:s', strtotime($bmDatetime)),
+            date('Y-m-d H:i:s', strtotime($bmDatetime)),
             $bm['bDatetime']
         );
     }
index 66a6e1fc5de8268e57dc457e9181dcd83bc8f2d0..0236a5fc28aaa2952eeb89ec510484f9d1c5ccce 100644 (file)
@@ -282,16 +282,16 @@ class Bookmark2TagTest extends TestBase
     public function testGetPopularTagsDays()
     {
         $user = $this->addUser();
-        $this->addTagBookmark($user, array('one', 'two'), 'today');
-        $this->addTagBookmark($user, array('one', 'thr'), 'today');
-        $this->addTagBookmark($user, array('one', 'two'), '-1 day 1 hour');
-        $this->addTagBookmark($user, array('one', 'thr'), '-3 days 1 hour');
+        $this->addTagBookmark($user, array('one', 'two'), 'now');
+        $this->addTagBookmark($user, array('one', 'thr'), 'now');
+        $this->addTagBookmark($user, array('one', 'two'), '-1 day -1 hour');
+        $this->addTagBookmark($user, array('one', 'thr'), '-3 days -1 hour');
 
         $arTags = $this->b2ts->getPopularTags(null, 10, null, 1);
         $this->assertInternalType('array', $arTags);
         $this->assertEquals(3, count($arTags));
-        $this->assertContains(array('tag' => 'one', 'bCount' => '3'), $arTags);
-        $this->assertContains(array('tag' => 'two', 'bCount' => '2'), $arTags);
+        $this->assertContains(array('tag' => 'one', 'bCount' => '2'), $arTags);
+        $this->assertContains(array('tag' => 'two', 'bCount' => '1'), $arTags);
         $this->assertContains(array('tag' => 'thr', 'bCount' => '1'), $arTags);
 
         $arTags = $this->b2ts->getPopularTags(null, 10, null, 2);