From 352a8e43341f85e1c7045f0cde2bb5455d185c7e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 27 May 2009 11:45:00 +0000 Subject: - Patch #473366 by Berdir: convert locale module to the new database abstraction layer. --- modules/locale/locale.test | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/locale/locale.test') diff --git a/modules/locale/locale.test b/modules/locale/locale.test index 9e793dffb..e1020a398 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -906,11 +906,14 @@ class LocaleUninstallFunctionalTest extends DrupalWebTestCase { $user = $this->drupalCreateUser(array('translate interface', 'access administration pages')); $this->drupalLogin($user); $this->drupalGet('admin/international/translate/translate'); - $string = db_fetch_object(db_query('SELECT min(lid) AS lid FROM {locales_source} WHERE location LIKE \'%.js%\' AND textgroup = \'default\'')); + $string = db_query('SELECT min(lid) AS lid FROM {locales_source} WHERE location LIKE :location AND textgroup = :textgroup', array( + ':location' => '%.js%', + ':textgroup' => 'default', + ))->fetchObject(); $edit = array('translations[fr]' => 'french translation'); $this->drupalPost('admin/international/translate/edit/' . $string->lid, $edit, t('Save translations')); _locale_rebuild_js('fr'); - $file = db_fetch_object(db_query('SELECT javascript FROM {languages} WHERE language = \'fr\'')); + $file = db_query('SELECT javascript FROM {languages} WHERE language = :language', array(':language' => 'fr'))->fetchObject(); $js_file = file_create_path(variable_get('locale_js_directory', 'languages')) . '/fr_' . $file->javascript . '.js'; $this->assertTrue($result = file_exists($js_file), t('JavaScript file created: %file', array('%file' => $result ? $js_file : t('none')))); -- cgit v1.2.3