summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-08 07:58:47 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-08 07:58:47 +0000
commitc4e1242e92f3bcedc15a663821e080dcea4be4b8 (patch)
tree59215bf056869efb33af429e78aed6660dc80efe /modules/simpletest
parentf5b02199c737d7a2de051d479de703a2176b1cbe (diff)
downloadbrdo-c4e1242e92f3bcedc15a663821e080dcea4be4b8.tar.gz
brdo-c4e1242e92f3bcedc15a663821e080dcea4be4b8.tar.bz2
#412518 by catch, bangpound, and yched: Convert taxonomy_node_* to field API (with upgrade path). Say buh-bye to old, crusty code.
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/tests/common.test11
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.'));
}