diff options
Diffstat (limited to 'modules/locale/locale.test')
-rw-r--r-- | modules/locale/locale.test | 7 |
1 files changed, 5 insertions, 2 deletions
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')))); |