function civicrm_api3_entity_tag_replace($params) {
$transaction = new CRM_Core_Transaction();
try {
- civicrm_api3_verify_one_mandatory($params, NULL, ['values', 'tag_id']);
-
$baseParams = _civicrm_api3_generic_replace_base_params($params);
unset($baseParams['tag_id']);
$tags = $this->callAPISuccess('entityTag', 'get', ['entity_id' => $contactId]);
$this->assertEquals(1, $tags['count']);
+
+ $params['tag'] = '';
+ $result = $this->callAPISuccess('profile', 'submit', $params);
+
+ $tags = $this->callAPISuccess('entityTag', 'get', ['entity_id' => $contactId]);
+ $this->assertEquals(0, $tags['count']);
}
/**