From c4e1242e92f3bcedc15a663821e080dcea4be4b8 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Thu, 8 Oct 2009 07:58:47 +0000 Subject: #412518 by catch, bangpound, and yched: Convert taxonomy_node_* to field API (with upgrade path). Say buh-bye to old, crusty code. --- modules/simpletest/tests/common.test | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'modules/simpletest/tests/common.test') diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 25d51d4d7..35c8bf52f 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -1355,14 +1355,15 @@ class DrupalDataApiTest extends DrupalWebTestCase { $this->assertTrue($update_result == SAVED_UPDATED, t('Correct value returned when a record updated with drupal_write_record() for table with single-field primary key.')); // Insert an object record for a table with a multi-field primary key. - $vocabulary_node_type = new stdClass(); - $vocabulary_node_type->vid = $vocabulary->vid; - $vocabulary_node_type->type = 'page'; - $insert_result = drupal_write_record('taxonomy_vocabulary_node_type', $vocabulary_node_type); + $node_access = new stdClass(); + $node_access->nid = mt_rand(); + $node_access->gid = mt_rand(); + $node_access->realm = $this->randomName(); + $insert_result = drupal_write_record('node_access', $node_access); $this->assertTrue($insert_result == SAVED_NEW, t('Correct value returned when a record is inserted with drupal_write_record() for a table with a multi-field primary key.')); // Update the record. - $update_result = drupal_write_record('taxonomy_vocabulary_node_type', $vocabulary_node_type, array('vid', 'type')); + $update_result = drupal_write_record('node_access', $node_access, array('nid', 'gid', 'realm')); $this->assertTrue($update_result == SAVED_UPDATED, t('Correct value returned when a record is updated with drupal_write_record() for a table with a multi-field primary key.')); } -- cgit v1.2.3