From 8d59f5b5fba5c494ea0e3276b69d687cb12b8f05 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 26 Feb 2009 20:43:56 +0000 Subject: Removed raw update sql and replaced it with Database::update(...) calls. (ticket #68) --- core/tests/Item_Model_Test.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/tests/Item_Model_Test.php') diff --git a/core/tests/Item_Model_Test.php b/core/tests/Item_Model_Test.php index e7c48917..449e42c3 100644 --- a/core/tests/Item_Model_Test.php +++ b/core/tests/Item_Model_Test.php @@ -42,8 +42,7 @@ class Item_Model_Test extends Unit_Test_Case { // Force the creation date to something well known $db = Database::instance(); - $db->query("UPDATE `items` SET `created` = 0 WHERE `id` = $item->id"); - $db->query("UPDATE `items` SET `updated` = 0 WHERE `id` = $item->id"); + $db->update("items", array("created" => 0, "updated" => 0), array("id" => $item->id)); $item->reload(); $item->title = "foo"; // force a change $item->save(); @@ -59,7 +58,7 @@ class Item_Model_Test extends Unit_Test_Case { // Force the updated date to something well known $db = Database::instance(); - $db->query("UPDATE `items` SET `updated` = 0 WHERE `id` = $item->id"); + $db->update("items", array("updated" => 0), array("id" => $item->id)); $item->reload(); $item->view_count++; $item->save(); -- cgit v1.2.3