api_v3_EmailTest - useTransaction()
authorTim Otten <totten@civicrm.org>
Mon, 22 Dec 2014 23:05:38 +0000 (15:05 -0800)
committerTim Otten <totten@civicrm.org>
Mon, 22 Dec 2014 23:09:15 +0000 (15:09 -0800)
tests/phpunit/api/v3/EmailTest.php

index 347c8ee5f10d8d4a0dcb3a7e6299b5a14f9c77e5..c9fa340ab8e03420a2084ea40bb79119fb3b4205 100644 (file)
@@ -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