From 77a09a77425f12350a6a98956aecfef6400bbda3 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 22 Dec 2014 15:05:37 -0800 Subject: [PATCH] api_v3_ContactTypeTest - useTransaction() --- tests/phpunit/api/v3/ContactTypeTest.php | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/tests/phpunit/api/v3/ContactTypeTest.php b/tests/phpunit/api/v3/ContactTypeTest.php index 14ee8d697c..4ebd0a474b 100644 --- a/tests/phpunit/api/v3/ContactTypeTest.php +++ b/tests/phpunit/api/v3/ContactTypeTest.php @@ -39,6 +39,7 @@ class api_v3_ContactTypeTest extends CiviUnitTestCase { function setUp() { parent::setUp(); + $this->useTransaction(TRUE); $this->_apiversion = 3; $params = array( 'label' => 'sub_individual', @@ -49,7 +50,6 @@ class api_v3_ContactTypeTest extends CiviUnitTestCase { ); $result = CRM_Contact_BAO_ContactType::add($params); $this->subTypeIndividual = $params['name']; - $this->_subTypeIndividualId = $result->id; $params = array( 'label' => 'sub_organization', @@ -60,7 +60,6 @@ class api_v3_ContactTypeTest extends CiviUnitTestCase { ); $result = CRM_Contact_BAO_ContactType::add($params); $this->subTypeOrganization = $params['name']; - $this->_subTypeOrganizationId = $result->id; $params = array( 'label' => 'sub_household', @@ -71,23 +70,6 @@ class api_v3_ContactTypeTest extends CiviUnitTestCase { ); $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); - } } /** -- 2.25.1