From: Tim Otten Date: Mon, 22 Dec 2014 23:05:38 +0000 (-0800) Subject: api_v3_EmailTest - useTransaction() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=881567d2ea6872a0af8b660c004eaaf3721f34b2;p=civicrm-core.git api_v3_EmailTest - useTransaction() --- diff --git a/tests/phpunit/api/v3/EmailTest.php b/tests/phpunit/api/v3/EmailTest.php index 347c8ee5f1..c9fa340ab8 100644 --- a/tests/phpunit/api/v3/EmailTest.php +++ b/tests/phpunit/api/v3/EmailTest.php @@ -41,6 +41,8 @@ class api_v3_EmailTest extends CiviUnitTestCase { $this->_apiversion = 3; $this->_entity = 'Email'; parent::setUp(); + $this->useTransaction(TRUE); + $this->_contactID = $this->organizationCreate(NULL); $this->_locationType = $this->locationTypeCreate(NULL); $this->_locationType2 = $this->locationTypeCreate(array( @@ -59,11 +61,6 @@ class api_v3_EmailTest extends CiviUnitTestCase { ); } - function tearDown() { - $this->contactDelete($this->_contactID); - $this->locationTypeDelete($this->_locationType->id); - $this->locationTypeDelete($this->_locationType2->id); - } public function testCreateEmail() { $params = $this->_params; //check there are no emails to start with