summaryrefslogtreecommitdiff
path: root/modules/gallery/tests/Item_Model_Test.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-21 11:30:34 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-21 11:30:34 -0800
commitbfcd99f3f2a7d1b2c5ed0b6593c202ff07058b68 (patch)
tree503611c8f638cb0c52d4ea72ed9ed661bfeb40ac /modules/gallery/tests/Item_Model_Test.php
parent0cd03c88834b106f6ae97173278aaf943e0d9d90 (diff)
Updated for K24
Diffstat (limited to 'modules/gallery/tests/Item_Model_Test.php')
-rw-r--r--modules/gallery/tests/Item_Model_Test.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/gallery/tests/Item_Model_Test.php b/modules/gallery/tests/Item_Model_Test.php
index e7dce893..bf5fca1a 100644
--- a/modules/gallery/tests/Item_Model_Test.php
+++ b/modules/gallery/tests/Item_Model_Test.php
@@ -35,8 +35,12 @@ class Item_Model_Test extends Unit_Test_Case {
$item = self::_create_random_item();
// Force the creation date to something well known
- $db = Database::instance();
- $db->update("items", array("created" => 0, "updated" => 0), array("id" => $item->id));
+ db::build()
+ ->update("items")
+ ->set("created", 0)
+ ->set("updated", 0)
+ ->where("id", "=", $item->id)
+ ->execute();
$item->reload();
$item->title = "foo"; // force a change
$item->save();
@@ -51,8 +55,11 @@ class Item_Model_Test extends Unit_Test_Case {
$this->assert_same(0, $item->view_count);
// Force the updated date to something well known
- $db = Database::instance();
- $db->update("items", array("updated" => 0), array("id" => $item->id));
+ db::build()
+ ->update("items")
+ ->set("updated", 0)
+ ->where("id", "=", $item->id)
+ ->execute();
$item->reload();
$item->view_count++;
$item->save();