api_v3_ImTest - Change quickCleanup() to useTransaction()
authorTim Otten <totten@civicrm.org>
Mon, 22 Dec 2014 21:10:43 +0000 (13:10 -0800)
committerTim Otten <totten@civicrm.org>
Mon, 22 Dec 2014 22:07:20 +0000 (14:07 -0800)
tests/phpunit/api/v3/ImTest.php

index efccb8c87926993730602d5d7b8df9d4d765513b..e79686f4da50a3c5389de2c15acbd098ca0d23c0 100644 (file)
@@ -45,6 +45,7 @@ class api_v3_ImTest extends CiviUnitTestCase {
 
   function setUp() {
     parent::setUp();
+    $this->useTransaction(TRUE);
 
     $this->_entity     = 'im';
     $this->_contactID  = $this->organizationCreate();
@@ -56,13 +57,6 @@ class api_v3_ImTest extends CiviUnitTestCase {
     );
   }
 
-  function tearDown() {
-    $this->quickCleanup(array(
-      'civicrm_im',
-      'civicrm_contact'
-    ));
-  }
-
   public function testCreateIm() {
     $result = $this->callAPIAndDocument($this->_entity, 'create', $this->params, __FUNCTION__, __FILE__);
     $this->assertEquals(1, $result['count'], 'In line ' . __LINE__);