diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-05-28 11:31:20 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-05-28 11:31:20 +0000 |
commit | cb756bcf08bb5e1288539c06aa16905cda06af9c (patch) | |
tree | 82f183fe5e6de9c570b6164e26ead2d4b3559503 /modules/block/block.test | |
parent | 194c9f2bd1894e291ecc0233af458449a023d0c3 (diff) | |
download | brdo-cb756bcf08bb5e1288539c06aa16905cda06af9c.tar.gz brdo-cb756bcf08bb5e1288539c06aa16905cda06af9c.tar.bz2 |
- Patch #337212 by Berdir: another Berdir patch to convert modules to the new database layer. Rock.
Diffstat (limited to 'modules/block/block.test')
-rw-r--r-- | modules/block/block.test | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/block/block.test b/modules/block/block.test index b6b1dd54b..34618e92d 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -46,7 +46,7 @@ class BlockTestCase extends DrupalWebTestCase { // Confirm that the box has been created, and then query the created bid. $this->assertText(t('The block has been created.'), t('Box successfully created.')); - $bid = db_result(db_query("SELECT bid FROM {box} WHERE info = '%s'", array($box['info']))); + $bid = db_query("SELECT bid FROM {box} WHERE info = :info", array(':info' => $box['info']))->fetchField(); // Check to see if the box was created by checking that it's in the database.. $this->assertNotNull($bid, t('Box found in database')); @@ -78,7 +78,7 @@ class BlockTestCase extends DrupalWebTestCase { $this->drupalPost('admin/build/block/add', $box, t('Save block')); // Set the created box to a specific region. - $bid = db_result(db_query("SELECT bid FROM {box} WHERE info = '%s'", array($box['info']))); + $bid = db_query("SELECT bid FROM {box} WHERE info = :info", array(':info' => $box['info']))->fetchField(); $edit = array(); $edit['block_' . $bid . '[region]'] = 'left'; $this->drupalPost('admin/build/block', $edit, t('Save blocks')); @@ -112,7 +112,10 @@ class BlockTestCase extends DrupalWebTestCase { // Set block title to confirm that interface works and override any custom titles. $this->drupalPost('admin/build/block/configure/' . $block['module'] . '/' . $block['delta'], array('title' => $block['title']), t('Save block')); $this->assertText(t('The block configuration has been saved.'), t('Block title set.')); - $bid = db_result(db_query("SELECT bid FROM {block} WHERE module = '%s' AND delta = %d", array($block['module'], $block['delta']))); + $bid = db_query("SELECT bid FROM {block} WHERE module = :module AND delta = :delta", array( + ':module' => $block['module'], + ':delta' => $block['delta'], + ))->fetchField(); // Check to see if the block was created by checking that it's in the database. $this->assertNotNull($bid, t('Block found in database')); |