diff options
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/tests/common.test | 11 |
1 files changed, 6 insertions, 5 deletions
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.')); } |