function setUp() {
parent::setUp();
+ $this->useTransaction(TRUE);
$this->_apiversion = 3;
$params = array(
'label' => 'sub_individual',
);
$result = CRM_Contact_BAO_ContactType::add($params);
$this->subTypeIndividual = $params['name'];
- $this->_subTypeIndividualId = $result->id;
$params = array(
'label' => 'sub_organization',
);
$result = CRM_Contact_BAO_ContactType::add($params);
$this->subTypeOrganization = $params['name'];
- $this->_subTypeOrganizationId = $result->id;
$params = array(
'label' => 'sub_household',
);
$result = CRM_Contact_BAO_ContactType::add($params);
$this->subTypeHousehold = $params['name'];
- $this->_subTypeHouseholdId = $result->id;
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- *
- */
- function tearDown() {
- $contactTypeIds = array(
- $this->_subTypeIndividualId,
- $this->_subTypeOrganizationId,
- $this->_subTypeHouseholdId,
- );
- foreach ($contactTypeIds as $typeId) {
- $this->contactTypeDelete($typeId);
- }
}
/**