class api_v3_ContactTypeTest extends CiviUnitTestCase {
protected $_apiversion;
+ /**
+ * @var string
+ */
+ protected $subTypeIndividual;
+
+ /**
+ * @var string
+ */
+ protected $subTypeOrganization;
+
+ /**
+ * @var string
+ */
+ protected $subTypeHousehold;
+
public function setUp(): void {
parent::setUp();
$this->useTransaction(TRUE);
'parent_id' => 1,
'is_active' => 1,
];
- $result = CRM_Contact_BAO_ContactType::add($params);
+ CRM_Contact_BAO_ContactType::add($params);
$this->subTypeIndividual = $params['name'];
$params = [
'parent_id' => 3,
'is_active' => 1,
];
- $result = CRM_Contact_BAO_ContactType::add($params);
+ CRM_Contact_BAO_ContactType::add($params);
$this->subTypeOrganization = $params['name'];
$params = [
'parent_id' => 2,
'is_active' => 1,
];
- $result = CRM_Contact_BAO_ContactType::add($params);
+ CRM_Contact_BAO_ContactType::add($params);
$this->subTypeHousehold = $params['name'];
}
'contact_type' => 'Individual',
'contact_sub_type' => $this->subTypeHousehold,
];
- $contact = $this->callAPIFailure('contact', 'create', $contactParams);
+ $this->callAPIFailure('contact', 'create', $contactParams);
// check for Type:Organization Subtype:sub_individual
$contactParams = [
'contact_type' => 'Organization',
'contact_sub_type' => $this->subTypeIndividual,
];
- $contact = $this->callAPIFailure('contact', 'create', $contactParams);
+ $this->callAPIFailure('contact', 'create', $contactParams);
}
/**
'contact_type' => 'Individual',
'contact_sub_type' => $this->subTypeHousehold,
];
- $updateContact = $this->callAPIFailure('contact', 'create', $updateParams);
+ $this->callAPIFailure('contact', 'create', $updateParams);
$params = [
'contact_id' => $contact['id'],
];
'contact_type' => 'Organization',
'contact_sub_type' => $this->subTypeIndividual,
];
- $updateContact = $this->callAPIFailure('contact', 'create', $updateParams);
+ $this->callAPIFailure('contact', 'create', $updateParams);
$params = [
'contact_id' => $contact['id'],
];
'parent_id' => 1,
'is_active' => 1,
];
- $getSubtype = CRM_Contact_BAO_ContactType::add($params);
+ CRM_Contact_BAO_ContactType::add($params);
$subtype = $params['name'];
// check for Type:Individual subype:sub_individual
'parent_id' => 3,
'is_active' => 1,
];
- $getSubtype = CRM_Contact_BAO_ContactType::add($params);
+ CRM_Contact_BAO_ContactType::add($params);
$subtype = $params['name'];
// check for Type:Organization subype:sub_organization
'contact_type' => 'Individual',
'contact_sub_type' => $this->subTypeHousehold,
];
- $updateContact = $this->callAPIFailure('contact', 'create', $updateParams);
+ $this->callAPIFailure('contact', 'create', $updateParams);
$params = [
'contact_id' => $contact['id'],
];
'contact_id' => $contact['id'],
'contact_sub_type' => $this->subTypeIndividual,
];
- $updateContact = $this->callAPIFailure('contact', 'create', $updateParams);
+ $this->callAPIFailure('contact', 'create', $updateParams);
$params = [
'contact_id' => $contact['id'],
];