summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/schema.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/schema.test')
-rw-r--r--modules/simpletest/tests/schema.test4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/simpletest/tests/schema.test b/modules/simpletest/tests/schema.test
index 716bef282..687fc67fd 100644
--- a/modules/simpletest/tests/schema.test
+++ b/modules/simpletest/tests/schema.test
@@ -103,7 +103,9 @@ class SchemaTestCase extends DrupalWebTestCase {
function tryInsert($table = 'test_table') {
try {
- db_query("INSERT INTO {" . $table . "} (id) VALUES (:id)", array(':id' => mt_rand(10, 20)));
+ db_insert($table)
+ ->fields(array('id' => mt_rand(10, 20)))
+ ->execute();
return TRUE;
}
catch (Exception $e) {