api_v3_SurveyTest
authorTim Otten <totten@civicrm.org>
Mon, 22 Dec 2014 19:59:59 +0000 (11:59 -0800)
committerTim Otten <totten@civicrm.org>
Mon, 22 Dec 2014 20:15:24 +0000 (12:15 -0800)
tests/phpunit/api/v3/SurveyTest.php

index 0b80f4f398ce4c922c95c9b87bd42cdd8cb27295..06ca4da8df7a2acf5d5a07adb0a618862d4d4203 100644 (file)
@@ -56,6 +56,7 @@ class api_v3_SurveyTest extends CiviUnitTestCase {
 
   function setUp() {
     $phoneBankActivityTypeID = $this->callAPISuccessGetValue('Option_value', array('label' => 'PhoneBank', 'return' => 'value'), 'integer');
+    $this->useTransaction();
     $this->enableCiviCampaign();
     $this->params = array(
       'title' => "survey title",
@@ -66,16 +67,6 @@ class api_v3_SurveyTest extends CiviUnitTestCase {
     parent::setUp();
   }
 
-/**
- * Here we clean up any test data we created.
- * Note that the quickCleanup function turns off Foreign keys first
- * so will not remove related entities
- */
-  function tearDown() {
-    $tablesToTruncate = array('civicrm_survey');
-    $this->quickCleanup($tablesToTruncate);
-  }
-
   /**
    * Test create function succeeds
    */