Ejegg has submitted this change and it was merged.

Change subject: Merge branch 'master' into deployment
......................................................................


Merge branch 'master' into deployment

bf7ae1c PHPUnit test for DonationInterface::createAdapter
e6b3532 Update recurring GC for DonationInterface changes

And delete tests

Change-Id: I5c1a8465c419f638e43b489a5f889a1943e569d1
---
D sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php
D sites/all/modules/wmf_civicrm/tests/phpunit/DonationInterfaceTest.php
2 files changed, 0 insertions(+), 105 deletions(-)

Approvals:
  Ejegg: Verified; Looks good to me, approved



diff --git 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php
 
b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php
deleted file mode 100644
index fb51d6b..0000000
--- 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalcollectTest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<<<<<<< HEAD   (24e0fc Merge branch 'master' into deployment)
-=======
-<?php
-
-/**
- * @group Globalcollect
- */
-class RecurringGlobalcollectTest extends BaseWmfDrupalPhpUnitTestCase {
-    function setUp() {
-        parent::setUp();
-        civicrm_initialize();
-
-        $this->subscription_id = 'SUB-FOO-' . mt_rand();
-        $this->amount = '1.12';
-
-        $this->contributions = array();
-
-        $result = civicrm_api3( 'Contact', 'create', array(
-            'first_name' => 'Testes',
-            'contact_type' => 'Individual',
-        ) );
-        $this->contact_id = $result['id'];
-
-        $result = civicrm_api3( 'ContributionRecur', 'create', array(
-            'contact_id' => $this->contact_id,
-            'amount' => $this->amount,
-            'frequency_interval' => 1,
-            'frequency_unit' => 'month',
-            'next_sched_contribution' => 
wmf_common_date_unix_to_civicrm(strtotime('+1 month')),
-            'installments' => 0,
-            'processor_id' => 1,
-            'currency' => 'USD',
-            'trxn_id' => "RECURRING GLOBALCOLLECT {$this->subscription_id}",
-        ) );
-        $this->contribution_recur_id = $result['id'];
-
-        $result = civicrm_api3( 'Contribution', 'create', array(
-            'contact_id' => $this->contact_id,
-            'contribution_recur_id' => $this->contribution_recur_id,
-            'currency' => 'USD',
-            'total_amount' => $this->amount,
-            'contribution_type' => 'Cash',
-            'payment_instrument' => 'Credit Card',
-            'trxn_id' => 'RECURRING GLOBALCOLLECT STUB_ORIG_CONTRIB-' . 
mt_rand(),
-        ) );
-        $this->contributions[] = $result['id'];
-               wmf_civicrm_insert_contribution_tracking( '..rcc', 'civicrm', 
wmf_common_date_unix_to_sql( strtotime( 'now' ) ), $result['id'] );
-       }
-
-    function testCharge() {
-        // FIXME: don't make real API calls, rely on DI test fixture responses 
instead.
-        $this->markTestSkipped( 'Makes API calls.' );
-
-        recurring_globalcollect_charge( $this->contribution_recur_id );
-
-        $result = civicrm_api3( 'Contribution', 'get', array(
-            'contact_id' => $this->contact_id,
-        ) );
-        $this->assertEquals( 2, count( $result['values'] ) );
-        foreach ( $result['values'] as $contribution ) {
-            if ( $contribution['id'] == $this->contributions[0] ) {
-                // Skip assertions on the synthetic original contribution
-                continue;
-            }
-
-            $this->assertEquals( 1,
-                preg_match( "/^RECURRING GLOBALCOLLECT 
{$this->subscription_id}-2\$/", $contribution['trxn_id'] ) );
-        }
-    }
-}
->>>>>>> BRANCH (bf7ae1 PHPUnit test for DonationInterface::createAdapter)
diff --git 
a/sites/all/modules/wmf_civicrm/tests/phpunit/DonationInterfaceTest.php 
b/sites/all/modules/wmf_civicrm/tests/phpunit/DonationInterfaceTest.php
deleted file mode 100644
index e5437fa..0000000
--- a/sites/all/modules/wmf_civicrm/tests/phpunit/DonationInterfaceTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-/**
- * Helps us not break the DonationInterface gateway adapter wrapper
- *
- * @group WmfCivicrm
- */
-class DonationInterfaceTest extends BaseWmfDrupalPhpUnitTestCase {
-
-       /**
-        * Do we blow up on the launch pad?
-        */
-       public function testCreateAdapter() {
-               $values = array(
-                       'amount' => 9.99,
-                       'effort_id' => 1,
-                       'order_id' => mt_rand(),
-                       'currency_code' => 'USD',
-                       'payment_product' => '',
-                       'language' => 'en',
-                       'contribution_tracking_id' => mt_rand(),
-                       'referrer' => 'dummy',
-               );
-               $adapter = DonationInterface::createAdapter( 'GlobalCollect', 
$values );
-               // see FIXME in recurring globalcollect
-               $adapter->addRequestData( array(
-                       'effort_id' => 1,
-               ) );
-               $data = $adapter->getData_Unstaged_Escaped();
-               foreach ( $values as $key => $value ) {
-                       $this->assertEquals( $value, $data[$key], "$key is 
being mangled in adapter construction" );
-               }
-       }
-}

-- 
To view, visit https://gerrit.wikimedia.org/r/225108
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c1a8465c419f638e43b489a5f889a1943e569d1
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to