Updated for K24

This commit is contained in:
Bharat Mediratta
2009-12-21 11:30:34 -08:00
parent 0cd03c8883
commit bfcd99f3f2
4 changed files with 31 additions and 18 deletions

View File

@@ -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();