api_v3_JobTest - 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:14 +0000 (14:07 -0800)
tests/phpunit/api/v3/JobTest.php

index 1be311d739443e3539887c0c9f020adc0cbde818..c63b33b47c1fbec7a6238885bfe8e95b97247c86 100644 (file)
@@ -49,6 +49,7 @@ class api_v3_JobTest extends CiviUnitTestCase {
 
   function setUp() {
     parent::setUp();
+    $this->useTransaction(TRUE);
     $this->_params = array(
       'sequential' => 1,
       'name' => 'API_Test_Job',
@@ -61,13 +62,6 @@ class api_v3_JobTest extends CiviUnitTestCase {
     );
   }
 
-  function tearDown() {
-    $this->quickCleanup(array('civicrm_job', 'civicrm_action_log', 'civicrm_action_schedule'));
-    $this->quickCleanUpFinancialEntities();
-    CRM_Utils_Hook::singleton()->reset();
-    parent::tearDown();
-  }
-
   /**
    * Check with no name
    */