diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-12-06 17:01:52 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-12-06 17:01:52 +0000 |
commit | 06c5979961971394c0451f07f5280b30906677c8 (patch) | |
tree | 15b7ca6217fe562773b4d2bd793ff410de54a646 /modules | |
parent | b12a25d24f68d7bfb44240cd84dcfc54c17e3009 (diff) | |
download | brdo-06c5979961971394c0451f07f5280b30906677c8.tar.gz brdo-06c5979961971394c0451f07f5280b30906677c8.tar.bz2 |
#626790 by justinrandell: Fixed bug where drupal_write_record() returns FALSE for valid update queries.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/tests/common.test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 8b2e24e21..35a2a7f87 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -1476,6 +1476,12 @@ class DrupalDataApiTest extends DrupalWebTestCase { $update_result = drupal_write_record('taxonomy_vocabulary', $vocabulary, array('vid')); $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.')); + // Run an update query where no field values are changed. The database + // layer should return zero for number of affected rows, but + // db_write_record() should still return SAVED_UPDATED. + $update_result = drupal_write_record('taxonomy_vocabulary', $vocabulary, array('vid')); + $this->assertTrue($update_result == SAVED_UPDATED, t('Correct value returned when a valid update is run without changing any values.')); + // Insert an object record for a table with a multi-field primary key. $node_access = new stdClass(); $node_access->nid = mt_rand(); |