/**
* Set up for test.
+ *
+ * @throws \CRM_Core_Exception
*/
public function setUp() {
parent::setUp();
$this->_individualID = $this->individualCreate();
$this->_tag = $this->tagCreate(['name' => 'EntityTagTest']);
$this->_tagID = $this->_tag['id'];
- $this->_householdID = $this->houseHoldCreate();
+ $this->_householdID = $this->householdCreate();
$this->_organizationID = $this->organizationCreate();
$this->_params = [
'entity_id' => $this->_individualID,
/**
* Test basic create.
+ *
* @param int $version
+ *
* @dataProvider versionThreeAndFour
+ * @throws \CRM_Core_Exception
*/
public function testContactEntityTagCreate($version) {
$this->_apiversion = $version;
- $result = $this->callAPISuccess('entity_tag', 'create', $this->_params);
+ $this->callAPISuccess('entity_tag', 'create', $this->_params);
}
/**
* Test multiple add functionality.
*
* This needs review for api v4 as it makes for a very non standard api.
+ *
+ * @throws \CRM_Core_Exception
*/
public function testAddDouble() {
/**
* Basic get functionality test.
+ *
* @param int $version
+ *
* @dataProvider versionThreeAndFour
+ * @throws \CRM_Core_Exception
*/
public function testIndividualEntityTagGet($version) {
$this->_apiversion = $version;
- $individualEntity = $this->callAPISuccess('entity_tag', 'create', $this->_params);
+ $this->callAPISuccess('entity_tag', 'create', $this->_params);
$paramsEntity = [
'contact_id' => $this->_individualID,
/**
* Test memory usage does not escalate crazily.
+ *
+ * @throws \CRM_Core_Exception
*/
public function testMemoryLeak() {
$start = memory_get_usage();
/**
* Test tag can be added to an organization.
+ *
* @param int $version
+ *
* @dataProvider versionThreeAndFour
+ * @throws \CRM_Core_Exception
*/
public function testOrganizationEntityGet($version) {
$this->_apiversion = $version;
/**
* Civicrm_entity_tag_Delete methods.
+ *
+ * @throws \CRM_Core_Exception
*/
public function testEntityTagDeleteNoTagId() {
$entityTagParams = [
$this->assertEquals($result['not_removed'], 1);
}
- public function testEntityTagCommonDeleteINDHH() {
- $entityTagParams = [
- 'contact_id_i' => $this->_individualID,
- 'contact_id_h' => $this->_householdID,
- 'tag_id' => $this->_tagID,
- ];
- $this->entityTagAdd($entityTagParams);
-
- $params = [
- 'contact_id_i' => $this->_individualID,
- 'contact_id_h' => $this->_householdID,
- 'tag_id' => $this->_tagID,
- ];
-
- $result = $this->callAPISuccess('entity_tag', 'delete', $params);
- $this->assertEquals($result['removed'], 2);
- }
-
public function testEntityTagCommonDeleteHH() {
$entityTagParams = [
'contact_id_i' => $this->_individualID,