API payment_token test re-order setup to allow rollback to work
authoreileenmcnaughton <eileen@fuzion.co.nz>
Wed, 8 Jul 2015 09:14:07 +0000 (09:14 +0000)
committereileenmcnaughton <eileen@fuzion.co.nz>
Wed, 8 Jul 2015 09:14:07 +0000 (09:14 +0000)
tests/phpunit/api/v3/PaymentTokenTest.php

index 1714900ff2d3fc44216bbb02a77c7496beefc6b3..9947f282b04cdc291131235cf81b216b87f71d5e 100644 (file)
@@ -40,6 +40,8 @@ class api_v3_PaymentTokenTest extends CiviUnitTestCase {
 
   public function setUp() {
     $this->_apiversion = 3;
+    $this->useTransaction(TRUE);
+    parent::setUp();
     $contactID = $this->individualCreate();
     $paymentProcessor = $this->processorCreate();
     $this->params = array(
@@ -48,8 +50,6 @@ class api_v3_PaymentTokenTest extends CiviUnitTestCase {
       'created_id' => $contactID,
       'payment_processor_id' => $paymentProcessor->id,
     );
-    parent::setUp();
-    $this->useTransaction(TRUE);
   }
 
   public function testCreatePaymentToken() {