'extends' => $dao->extends,
);
+ if (!empty($params['id'])) {
+ $cvParam['id'] = $params['id'];
+ }
+
if ($cvParam['type'] == 'File') {
$cvParam['file_id'] = $fieldValue['value'];
}
$this->assertEquals($params["custom_{$customField['id']}_-1"], $result["custom_{$customField['id']}_1"]);
$this->assertEquals($params['entityID'], $result['entityID']);
+ $updateParams = array(
+ 'id' => 1,
+ 'entityID' => $contactID,
+ "custom_{$customField['id']}" => 2,
+ );
+ CRM_Core_BAO_CustomValueTable::setValues($updateParams);
+
+ $criteria = array(
+ 'id' => 1,
+ 'entityID' => $contactID,
+ );
+ $result = CRM_Core_BAO_CustomValueTable::getValues($criteria);
+ $this->assertEquals(2, $result["custom_{$customField['id']}_1"]);
+
$this->customFieldDelete($customField['id']);
$this->customGroupDelete($customGroup['id']);
$this->contactDelete($contactID);