t('[200824] Failing drupal_write_record() doesn\'t keep $object\'s original array form'), 'desc' => t('A small bug exists in drupal_write_record() failing to convert an array passed in as $object back to array format should drupal_get_schema() fail for any reason. Although drupal_get_schema() is not meant to return FALSE for any reason drupal_write_record() is still meant to live up to expectation and leave $object in it\'s original state.'), 'group' => t('Drupal 7 Tests'), ); } function testIssue() { $array = array(); $object = new stdClass(); // try to write record into not exsisted table drupal_write_record($this->randomName(), $array); drupal_write_record($this->randomName(), $object); $this->assertTrue(is_array($array), 'Test original array form'); $this->assertTrue(is_object($object), 'Test original object form'); } }