summaryrefslogtreecommitdiff
path: root/core/tests
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-02-08 18:03:31 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-02-08 18:03:31 +0000
commit3b944bca5d912c1a93834340f3e5ce69ee1faafb (patch)
tree7acf3367890bbdff4a4ae47ea4a9d91b5029aae0 /core/tests
parent0f9c5feb895f64575ab7334140846f9ab532d00e (diff)
Use the ORM method delete_all to remove selected records from the
database instead of calling the Database::query with raw sql.
Diffstat (limited to 'core/tests')
-rw-r--r--core/tests/I18n_Test.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/tests/I18n_Test.php b/core/tests/I18n_Test.php
index e621c0e3..20f65528 100644
--- a/core/tests/I18n_Test.php
+++ b/core/tests/I18n_Test.php
@@ -28,8 +28,9 @@ class I18n_Test extends Unit_Test_Case {
'locale_dir' => VARPATH . 'locale/');
$this->i18n = I18n::instance($config);
- $db = Database::instance();
- $db->query("DELETE FROM `incoming_translations` WHERE `locale` = 'te_ST'");
+ ORM::factory("incoming_translation")
+ ->where("locale", "te_ST")
+ ->delete_all();
$messages_de_DE = array(
array('Hello world', 'Hallo Welt'),