api_v3_PhoneTest - Change quickCleanup() to useTransaction()
authorTim Otten <totten@civicrm.org>
Mon, 22 Dec 2014 20:14:58 +0000 (12:14 -0800)
committerTim Otten <totten@civicrm.org>
Mon, 22 Dec 2014 22:06:35 +0000 (14:06 -0800)
tests/phpunit/api/v3/PhoneTest.php

index fa76667b00d9d93c065674ce2cf56285ee4142bb..f343f26bd862edf5e0e43c644f89bfef112583b4 100644 (file)
@@ -45,12 +45,12 @@ class api_v3_PhoneTest extends CiviUnitTestCase {
   function setUp() {
     $this->_apiversion = 3;
     parent::setUp();
+    $this->useTransaction();
 
     $this->_contactID    = $this->organizationCreate();
     $loc                 = $this->locationTypeCreate();
     $this->_locationType = $loc->id;
     CRM_Core_PseudoConstant::flush();
-    $this->quickCleanup(array('civicrm_phone'));
     $this->_params = array(
       'contact_id' => $this->_contactID,
       'location_type_id' => $this->_locationType,
@@ -60,11 +60,6 @@ class api_v3_PhoneTest extends CiviUnitTestCase {
     );
   }
 
-  function tearDown() {
-    $this->locationTypeDelete($this->_locationType);
-    $this->contactDelete($this->_contactID);
-  }
-
   public function testCreatePhone() {
 
     $result = $this->callAPIAndDocument('phone', 'create', $this->_params, __FUNCTION__, __FILE__);