summaryrefslogtreecommitdiff
path: root/modules/menu/menu.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-05-07 16:22:45 +0000
committerDries Buytaert <dries@buytaert.net>2009-05-07 16:22:45 +0000
commitf3526a344ef5cabc7080a132aa9fc3380574ae97 (patch)
treeebd628f811b879d66db3991683e26c0f0f4d0970 /modules/menu/menu.test
parentba40a41659d8cb9d38fcbaf79d48b97b61f64416 (diff)
downloadbrdo-f3526a344ef5cabc7080a132aa9fc3380574ae97.tar.gz
brdo-f3526a344ef5cabc7080a132aa9fc3380574ae97.tar.bz2
- Patch #394476 by Berdir, pwolanin, Crell: converted the module to the new database abstraction layer.
Diffstat (limited to 'modules/menu/menu.test')
-rw-r--r--modules/menu/menu.test6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/menu/menu.test b/modules/menu/menu.test
index f4ef10437..728955ed8 100644
--- a/modules/menu/menu.test
+++ b/modules/menu/menu.test
@@ -165,7 +165,7 @@ class MenuTestCase extends DrupalWebTestCase {
$this->drupalPost('admin/build/menu-customize/'. $item1['menu_name'], $edit, t('Save configuration'));
// Verify in the database.
- $hidden = db_result(db_query("SELECT hidden FROM {menu_links} WHERE mlid = :mlid", array('mlid' => $item1['mlid'])));
+ $hidden = db_query("SELECT hidden FROM {menu_links} WHERE mlid = :mlid", array(':mlid' => $item1['mlid']))->fetchField();
$this->assertEqual($hidden, 0, t('Link is not hidden in the database table when enabled via the overview form'));
// Save menu links for later tests.
@@ -205,7 +205,7 @@ class MenuTestCase extends DrupalWebTestCase {
$this->assertText($title, 'Menu link was added');
// Retrieve menu link.
- $item = db_fetch_array(db_query("SELECT * FROM {menu_links} WHERE link_title = '%s'", $title));
+ $item = db_query("SELECT * FROM {menu_links} WHERE link_title = :title", array(':title' => $title))->fetchAssoc();
// Check the structure in the DB of the two menu links.
// In general, if $n = $item['depth'] then $item['p'. $n] == $item['mlid'] and $item['p' . ($n - 1)] == $item['plid'] (unless depth == 0).
@@ -389,7 +389,7 @@ class MenuTestCase extends DrupalWebTestCase {
$this->drupalPost("admin/build/menu/item/$mlid/edit", $edit, t('Save'));
// Verify in the database.
- $hidden = db_result(db_query("SELECT hidden FROM {menu_links} WHERE mlid = :mlid", array('mlid' => $mlid)));
+ $hidden = db_query("SELECT hidden FROM {menu_links} WHERE mlid = :mlid", array(':mlid' => $mlid))->fetchField();
$this->assertEqual($hidden, 0, t('Link is not hidden in the database table'));
}