Merge branch '5.6' of https://github.com/civicrm/civicrm-core
authoreileen <emcnaughton@wikimedia.org>
Wed, 19 Sep 2018 01:58:16 +0000 (13:58 +1200)
committereileen <emcnaughton@wikimedia.org>
Wed, 19 Sep 2018 01:58:25 +0000 (13:58 +1200)
1  2 
api/v3/EntityTag.php
tests/phpunit/api/v3/ProfileTest.php

index 6b0bd7033e1db81c51ddbaae92c5e99429dcb938,16b7890ab5cb4475fee491109d97d6681420045f..39a6f8ace4c692b9864ce3959011c7db01d9ef99
@@@ -168,8 -168,6 +168,7 @@@ function _civicrm_api3_entity_tag_commo
  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']);
  
index 1ceee078b704e5fc9bcdfdc1cc4e7792b774f24c,486d10a10920d5bd200f145d7b022fa5904bc8b3..e049425fc4ccb6eef7835681cf608ae68faea11e
@@@ -735,6 -735,12 +735,13 @@@ class api_v3_ProfileTest extends CiviUn
  
      $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']);
++
    }
  
    /**