jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/330330 )

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
......................................................................


Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

+ 03c978647c5fc7f2fe45d19ed63013010c199665 Quick fix for drush dpm
+ 2466cf393e8ff95420869106e5b1afdd268d4e28 Create & use location update 
function in the scenarios where we are updating.
+ 46e8202346be8113b7e4ee03c5f0e11d6f1957f3 Update PHPmailer for CVE-2016-10045 
and CVE-2016-10033
+ 2ecaa2ace1bcd4b504fd79584ff784f1eb3b4084 Alter test to accomodate minor 
format change in master.
+ 9dd75bc1b3c8c926bc1d539e8c46d93f6a6ebb72 Do not write address to the database 
if all data is empty.
+ 286db02dab0dcc354e650296efb8f62f34ee6968 Consolidate test data into one 
directory.
+ fe041629f5dc815c9de17c6b5088e99fc28acff8 Consolidate test cleanup routine 
into parent class
+ e4893eaed91af8aa31e3ddf30d163fb2a88bcb55 Add preliminary CoinBase Test.
+ 021ec65077abf0cc0fb749508a4d017847968829 Remove duplicate field in import 
fields array.
+ 40b8bd0a9cbef85b37d6620651fe9f4ad64b32ad Fix test that was not running to run.
+ ac586fe3cb7051272ae32bb8cee3d1754d657a10 Revert "Update PHPmailer for 
CVE-2016-10045 and CVE-2016-10033"
+ 4e5852563d51613a8c33a46d6215c7832f26e0b4 Add support for importing campaign 
source, medium for CoinBase.
+ 768b0e9f9d859e37eb51e8eab4170ccbc4858ee8 Pull composer changes from deployment

Change-Id: Id3f03cc25c78be8a0c3efbb13ea8dba8d5ce5015
---
D sites/all/modules/offline2civicrm/tests/CoinBaseTest.php
D sites/all/modules/offline2civicrm/tests/ContributionConversionTest.php
D sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php
D sites/all/modules/offline2civicrm/tests/JpMorganFileTest.php
D sites/all/modules/offline2civicrm/tests/data/coinbase.csv
D sites/all/modules/offline2civicrm/tests/data/engage.csv
D sites/all/modules/offline2civicrm/tests/data/engage_postal.csv
D sites/all/modules/offline2civicrm/tests/data/engage_reduced.csv
D sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php
D sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
D sites/all/modules/wmf_civicrm/tests/phpunit/HelperFunctionsTest.php
11 files changed, 0 insertions(+), 1,163 deletions(-)

Approvals:
  jenkins-bot: Verified
  Eileen: Looks good to me, approved



diff --git a/sites/all/modules/offline2civicrm/tests/CoinBaseTest.php 
b/sites/all/modules/offline2civicrm/tests/CoinBaseTest.php
deleted file mode 100644
index e7f9f78..0000000
--- a/sites/all/modules/offline2civicrm/tests/CoinBaseTest.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/**
- * @group Import
- * @group Offline2Civicrm
- */
-class CoinBaseTest extends BaseChecksFileTest {
-    protected $epochtime;
-
-    function setUp() {
-        parent::setUp();
-
-        $this->epochtime = wmf_common_date_parse_string('2016-09-15');
-        $this->setExchangeRates($this->epochtime, array('USD' => 1, 'BTC' => 
3));
-        $this->gateway = 'coinbase';
-    }
-
-    function testImport() {
-        civicrm_initialize();
-        $this->trxn_id = 'Pluto';
-        $this->doCleanUp();
-
-        $importer = new CoinbaseFile( __DIR__ . "/data/coinbase.csv" );
-        $importer->import();
-
-        $contribution = 
wmf_civicrm_get_contributions_from_gateway_id($this->gateway, $this->trxn_id);
-        $this->assertEquals(1, count($contribution));
-        $this->assertEquals('COINBASE PLUTO', $contribution[0]['trxn_id']);
-        $this->assertEquals('online', db_query("SELECT {utm_medium} from 
{contribution_tracking} WHERE contribution_id = 
{$contribution[0]['id']}")->fetchField());
-    }
-
-}
diff --git 
a/sites/all/modules/offline2civicrm/tests/ContributionConversionTest.php 
b/sites/all/modules/offline2civicrm/tests/ContributionConversionTest.php
deleted file mode 100644
index da00108..0000000
--- a/sites/all/modules/offline2civicrm/tests/ContributionConversionTest.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-class ContributionConversionTest extends BaseChecksFileTest {
-
-    public function setUp() {
-        parent::setUp();
-        civicrm_initialize();
-        // I'm slightly confused why this is required. phpunit is blowing away 
GLOBALS,
-        // including the one holding the DB connection but civicrm_initialize 
is not
-        // calling this on the second run due to the static being set.
-        // The reason this is confusing is logically, but not in practice,
-        // this test should be no more affected than other tests.
-        CRM_Core_Config::singleton(TRUE, TRUE);
-
-        $result = $this->callAPISuccess('Contact', 'create', array(
-            'contact_type' => 'Individual',
-            'email' => 'f...@example.com',
-        ));
-        $this->contact_id = $result['id'];
-
-        $this->gateway_txn_id = "NaN-" . mt_rand();
-        $this->transaction = WmfTransaction::from_unique_id( "GLOBALCOLLECT 
{$this->gateway_txn_id}" );
-
-        $contributionResult = $this->callAPISuccess('Contribution', 'create', 
array(
-            'contact_id' => $this->contact_id,
-            'trxn_id' => $this->transaction->get_unique_id(),
-            'contribution_type' => 'Cash',
-            'total_amount' => '20.01',
-            'receive_date' => wmf_common_date_unix_to_sql( time() ),
-        ));
-        $this->contribution_id = $contributionResult['id'];
-
-        wmf_civicrm_set_custom_field_values($this->contribution_id, array(
-            'original_amount' => '20.01',
-            'original_currency' => 'USD',
-        ));
-    }
-
-    public function tearDown() {
-        parent::tearDown();
-        $this->callAPISuccess('Contribution', 'delete', array('id' => 
$this->contribution_id));
-        $this->callAPISuccess('Contact', 'delete', array('id' => 
$this->contact_id));
-    }
-
-    public function testMakeRecurring() {
-        ContributionConversion::makeRecurring( $this->transaction );
-
-        $contributions = wmf_civicrm_get_contributions_from_gateway_id( 
$this->transaction->gateway, $this->transaction->gateway_txn_id );
-        $this->assertNotNull( $contributions[0]['contribution_recur_id'],
-            "Became a recurring contribution" );
-    }
-
-    public function testMakeRecurringCancelled() {
-        ContributionConversion::makeRecurring( $this->transaction, true );
-
-        $contributions = wmf_civicrm_get_contributions_from_gateway_id( 
$this->transaction->gateway, $this->transaction->gateway_txn_id );
-
-        $api = civicrm_api_classapi();
-        $api->ContributionRecur->Get( array(
-            'id' => $contributions[0]['contribution_recur_id'],
-
-            'version' => 3,
-        ) );
-        $contribution_recur = $api->values[0];
-        $this->assertNotNull( $contribution_recur->cancel_date,
-            "Marked as cancelled" );
-    }
-}
diff --git a/sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php 
b/sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php
deleted file mode 100644
index a546261..0000000
--- a/sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php
+++ /dev/null
@@ -1,263 +0,0 @@
-<<<<<<< HEAD   (f78c89 Update PHPMailer)
-=======
-<?php
-
-/**
- * @group Import
- * @group Offline2Civicrm
- */
-class EngageChecksFileTest extends BaseChecksFileTest {
-
-    protected $sourceFileUri = '';
-    function setUp() {
-        parent::setUp();
-
-        require_once __DIR__ . "/includes/EngageChecksFileProbe.php";
-    }
-
-    function testParseRow_Individual() {
-        $data = array(
-            'Batch' => '1234',
-            'Contribution Type' => 'Engage',
-            'Total Amount' => '50',
-            'Source' => 'USD 50.00',
-            'Postmark Date' => '',
-            'Received Date' => '4/1/14',
-            'Payment Instrument' => 'Check',
-            'Check Number' => '2020',
-            'Restrictions' => 'Unrestricted - General',
-            'Gift Source' => 'Community Gift',
-            'Direct Mail Appeal' => 'White Mail',
-            'Prefix' => 'Mrs.',
-            'First Name' => 'Sub',
-            'Last Name' => 'Tell',
-            'Suffix' => '',
-            'Street Address' => '1000 Markdown Markov',
-            'Additional Address 1' => '',
-            'Additional Address 2' => '',
-            'City' => 'Best St. Louis',
-            'State' => 'MA',
-            'Postal Code' => '2468',
-            'Country' => '',
-            'Phone' => '(123) 456-0000',
-            'Email' => '',
-            'Thank You Letter Date' => '5/1/14',
-            'AC Flag' => 'Y',
-        );
-        $expected_normal = array(
-            'check_number' => '2020',
-            'city' => 'Best St. Louis',
-            'contact_source' => 'check',
-            'contact_type' => 'Individual',
-            'contribution_source' => 'USD 50.00',
-            'contribution_type' => 'engage',
-            'country' => 'US',
-            'currency' => 'USD',
-            'date' => 1396310400,
-            'direct_mail_appeal' => 'White Mail',
-            'first_name' => 'Sub',
-            'gateway' => 'engage',
-            'gateway_txn_id' => 'e59ed825ea04516fb2abf1c130d47525',
-            'gift_source' => 'Community Gift',
-            'gross' => '50',
-            'import_batch_number' => '1234',
-            'last_name' => 'Tell',
-            'name_prefix' => 'Mrs.',
-            'payment_method' => 'Check',
-            'postal_code' => '02468',
-            'raw_contribution_type' => 'Engage',
-            'restrictions' => 'Unrestricted - General',
-            'state_province' => 'MA',
-            'street_address' => '1000 Markdown Markov',
-            'thankyou_date' => 1398902400,
-        );
-
-        $importer = new EngageChecksFileProbe( "null URI" );
-        $output = $importer->_parseRow( $data );
-
-        $this->stripSourceData( $output );
-        $this->assertEquals( $expected_normal, $output );
-    }
-
-    function testParseRow_Organization() {
-        $data = array(
-            'Batch' => '1235',
-            'Contribution Type' => 'Engage',
-            'Total Amount' => '51.23',
-            'Source' => 'USD 51.23',
-            'Postmark Date' => '',
-            'Received Date' => '4/1/14',
-            'Payment Instrument' => 'Check',
-            'Check Number' => '202000001',
-            'Restrictions' => 'Restricted-Foundation',
-            'Gift Source' => 'Foundation Gift',
-            'Direct Mail Appeal' => 'White Mail',
-            'Organization Name' => 'One Pacific Entitlement',
-            'Street Address' => '1000 Markdown Markov',
-            'Additional Address 1' => '',
-            'Additional Address 2' => '',
-            'City' => 'Best St. Louis',
-            'State' => 'MA',
-            'Postal Code' => '123-LAX',
-            'Country' => 'FR',
-            'Phone' => '+357 (123) 456-0000',
-            'Email' => '',
-            'Thank You Letter Date' => '5/1/14',
-            'AC Flag' => '',
-        );
-        $expected_normal = array(
-            'check_number' => '202000001',
-            'city' => 'Best St. Louis',
-            'contact_source' => 'check',
-            'contact_type' => 'Organization',
-            'contribution_source' => 'USD 51.23',
-            'contribution_type' => 'engage',
-            'country' => 'FR',
-            'currency' => 'USD',
-            'date' => 1396310400,
-            'direct_mail_appeal' => 'White Mail',
-            'gateway' => 'engage',
-            'gateway_txn_id' => '6dbb8d844c7509076e2a275fb76d0130',
-            'gift_source' => 'Foundation Gift',
-            'gross' => 51.23,
-            'import_batch_number' => '1235',
-            'organization_name' => 'One Pacific Entitlement',
-            'payment_method' => 'Check',
-            'postal_code' => '123-LAX',
-            'raw_contribution_type' => 'Engage',
-            'restrictions' => 'Restricted-Foundation',
-            'state_province' => 'MA',
-            'street_address' => '1000 Markdown Markov',
-            'thankyou_date' => 1398902400,
-        );
-
-        $importer = new EngageChecksFileProbe( "null URI" );
-        $output = $importer->_parseRow( $data );
-
-        $this->stripSourceData( $output );
-        $this->assertEquals( $expected_normal, $output );
-    }
-
-  public function testImporterFormatsPostal() {
-    civicrm_initialize();
-    $fileUri = $this->setupFile('engage_postal.csv');
-
-    $importer = new EngageChecksFile($fileUri);
-    $importer->import();
-    $contact = $this->callAPISuccess('Contact', 'get', array('email' => 
'rsimps...@unblog.fr', 'sequential' => 1));
-    $this->assertEquals('07065', $contact['values'][0]['postal_code']);
-    $this->assertEquals(5, strlen($contact['values'][0]['postal_code']));
-  }
-
-    public function testImporterCreatesOutputFiles() {
-      civicrm_initialize();
-      $this->sourceFileUri = __DIR__ . '/../tests/data/engage_reduced.csv';
-      $fileUri = $this->setupFile('engage_reduced.csv');
-
-      $importer = new EngageChecksFile($fileUri);
-      $messages = $importer->import();
-      global $user;
-      $this->assertEquals(
-        array (
-          0 => 'Successful import!',
-          'Result' => '14 out of 18  rows were imported.',
-          'not imported' => '4 not imported rows logged to <a 
href=\'/import_output/' . substr(str_replace('.csv', '_all_missed.' . 
$user->uid, $fileUri), 12) ."'> file</a>.",
-          'Duplicate' => '1 Duplicate row logged to <a href=\'/import_output/' 
. substr(str_replace('.csv', '_skipped.' . $user->uid, $fileUri), 12) ."'> 
file</a>.",
-          'Error' => '3 Error rows logged to <a href=\'/import_output/'.  
substr(str_replace('.csv', '_errors.' . $user->uid, $fileUri), 12) ."'> 
file</a>.",
-        )
-       , $messages);
-
-      $errorsURI = str_replace('.csv', '_errors.' . $user->uid . '.csv', 
$fileUri);
-      $this->assertTrue(file_exists($errorsURI));
-      $errors = file($errorsURI);
-
-      // Header row
-      $this->assertEquals('Error,Banner,Campaign,Medium,Batch,"Contribution 
Type","Total Amount",Source,"Postmark Date","Received Date","Payment 
Instrument","Check Number",Restrictions,"Gift Source","Direct Mail 
Appeal","Organization Name","Street Address",City,Country,"Postal 
Code",Email,State,"Thank You Letter Date","AC Flag",Notes,"Do Not Email","Do 
Not Phone","Do Not Mail","Do Not SMS","Is Opt Out"', trim($errors[0]));
-      unset($errors[0]);
-
-      $this->assertEquals(3, count($errors));
-      $this->assertEquals('"\'Unrstricted - General\' is not a valid option 
for field ' . wmf_civicrm_get_custom_field_name('Fund') . 
'",B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10563,Engage,24,"USD
 24.00",5/9/2015,5/9/2015,Cash,1,"Unrstricted - General","Corporate Gift","Carl 
TEST Perry",Roombo,"53 International 
Circle",Nowe,Poland,,cper...@salon.com,,12/21/2014,,,,,,,
-', $errors[1]);
-
-      $skippedURI = str_replace('.csv', '_skipped.' . $user->uid . '.csv', 
$fileUri);
-      $this->assertTrue(file_exists($skippedURI));
-      $skipped = file($skippedURI);
-      // 1 + 1 header row
-      $this->assertEquals(2, count($skipped));
-
-      $allURI = str_replace('.csv', '_all_missed.' . $user->uid . '.csv', 
$fileUri);
-      $this->assertTrue(file_exists($allURI));
-      $all = file($allURI);
-      // 1 header row, 1 skipped, 3 errors.
-      $this->assertEquals(5, count($all));
-
-    }
-
-  /**
-   * Clean up transactions from previous test runs.
-   *
-   * If you run this several times locally it will fail on duplicate 
transactions
-   * if we don't clean them up first.
-   */
-  public function purgePreviousData() {
-    $this->callAPISuccess('Contribution', 'get', array(
-      'api.Contribution.delete' => 1,
-      wmf_civicrm_get_custom_field_name('gateway_txn_id') => array('IN' => 
$this->getGatewayIDs()),
-      'api.contact.delete' => array('skip_undelete' => 1),
-    ));
-    CRM_Core_DAO::executeQuery('DELETE FROM civicrm_contact WHERE 
organization_name = "Jaloo"');
-  }
-
-   /**
-    * Get the gateway IDS from the source file.
-    */
-    public function getGatewayIDs() {
-      $gatewayIDs = array();
-      $data = $this->getParsedData();
-      foreach ($data as $record) {
-        $gatewayIDs[] = $record['gateway_txn_id'];
-      }
-      return $gatewayIDs;
-    }
-
-   /**
-    * Get parsed data from the source file.
-    *
-    * @return array
-    */
-    public function getParsedData() {
-      $file = fopen($this->sourceFileUri, 'r');
-      $result = array();
-      $importer = new EngageChecksFileProbe( "null URI" );
-      while(($row = fgetcsv( $file, 0, ',', '"', '\\')) !== FALSE) {
-        if ($row[0] == 'Banner') {
-          // Header row.
-          $headers = _load_headers($row);
-          continue;
-        }
-        $data = array_combine(array_keys($headers), array_slice($row, 0, 
count($headers)));
-        $result[] = $importer->_parseRow($data);
-
-      }
-      return $result;
-    }
-
-  /**
-   * Set up the file for import.
-   *
-   * @param string $inputFileName
-   *
-   * @return string
-   */
-  public function setupFile($inputFileName) {
-    $this->sourceFileUri = __DIR__ . '/../tests/data/' . $inputFileName;
-    $this->purgePreviousData();
-
-    // copy the file to a temp dir so copies are made in the temp dir.
-    // This is where it would be in an import.
-    $fileUri = tempnam(sys_get_temp_dir(), 'Engage') . '.csv';
-    copy($this->sourceFileUri, $fileUri);
-    return $fileUri;
-  }
-}
->>>>>>> BRANCH (768b0e Pull composer changes from deployment)
diff --git a/sites/all/modules/offline2civicrm/tests/JpMorganFileTest.php 
b/sites/all/modules/offline2civicrm/tests/JpMorganFileTest.php
deleted file mode 100644
index 6961c78..0000000
--- a/sites/all/modules/offline2civicrm/tests/JpMorganFileTest.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<<<<<<< HEAD   (f78c89 Update PHPMailer)
-=======
-<?php
-
-/**
- * @group Import
- * @group Offline2Civicrm
- */
-class JpMorganFileTest extends BaseChecksFileTest {
-    protected $epochtime;
-    protected $strtime;
-
-    function setUp() {
-        parent::setUp();
-
-        require_once __DIR__ . "/includes/JpMorganFileProbe.php";
-
-        $this->strtime = '04/02/2000';
-        $this->epochtime = wmf_common_date_parse_string('2000-04-02');
-        $this->setExchangeRates( $this->epochtime, array( 'USD' => 1, 'EUR' => 
3 ) );
-        $this->gateway = 'jpmorgan';
-    }
-
-    function testParseRow() {
-        $data = array(
-            'Account Name' => 'Testes EUR_Public',
-            'Currency' => 'EUR',
-            'Customer Reference' => 'UNAVAILABLE',
-            'Bank Reference' => '1234TEST',
-            'Transaction Date' => '04/01/2000',
-            'Description' => 'FOO CREDIT RECEIVED',
-            'Value Date' => $this->strtime,
-            'Credit Amount' => '5.50',
-        );
-        $expected_normal = array(
-            'contact_source' => 'check',
-            'contact_type' => 'Individual',
-            'country' => 'US',
-            'currency' => 'EUR',
-            'date' => 954547200,
-            'direct_mail_appeal' => 'White Mail',
-            'email' => 'nob...@wikimedia.org',
-            'gateway_account' => 'Testes EUR_Public',
-            'gateway' => 'jpmorgan',
-            'gateway_txn_id' => '1234TEST',
-            'gift_source' => 'Community Gift',
-            'gross' => '5.50',
-            'no_thank_you' => 'No Contact Details',
-            'payment_instrument' => 'JP Morgan EUR',
-            'restrictions' => 'Unrestricted - General',
-            'settlement_date' => $this->epochtime,
-        );
-
-        $importer = new JpMorganFileProbe( "no URI" );
-        $output = $importer->_parseRow( $data );
-
-        $this->stripSourceData( $output );
-        $this->assertEquals( $expected_normal, $output );
-    }
-
-    function testImport() {
-        //FIXME
-        $_GET['q'] = '';
-        civicrm_initialize();
-        $this->trxn_id = '1234TEST';
-        $this->doCleanUp();
-
-        $this->setExchangeRates( wmf_common_date_parse_string( '2000-04-01' ), 
array( 'USD' => 1, 'EUR' => 3 ) );
-
-        $importer = new JpMorganFileProbe( __DIR__ . "/data/jpmorgan.csv" );
-        $importer->import();
-
-        $contribution = wmf_civicrm_get_contributions_from_gateway_id( 
'jpmorgan', '1234TEST' );
-        $this->assertEquals( 1, count( $contribution ) );
-        $this->assertEquals( 'JPMORGAN 1234TEST', $contribution[0]['trxn_id'] 
);
-    }
-
-    /**
-     * @expectedException WmfException
-     * @expectedExceptionCode WmfException::INVALID_FILE_FORMAT
-     * @expectedExceptionMessage Duplicate column headers: CURRENCY, reference
-     */
-    function testImportDuplicateHeaders() {
-        //FIXME
-        $_GET['q'] = '';
-        //FIXME
-        civicrm_initialize();
-
-        $importer = new JpMorganFileProbe( __DIR__ . 
"/data/duplicate_header.csv" );
-        $importer->import();
-    }
-}
->>>>>>> BRANCH (768b0e Pull composer changes from deployment)
diff --git a/sites/all/modules/offline2civicrm/tests/data/coinbase.csv 
b/sites/all/modules/offline2civicrm/tests/data/coinbase.csv
deleted file mode 100644
index d0c8678..0000000
--- a/sites/all/modules/offline2civicrm/tests/data/coinbase.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-BTC Price,Currency,Customer Email,Native Price,Phone Number,Recurring Payment 
ID,Refund Transaction ID,Shipping Address 1,Shipping Address 2,Shipping 
City,Shipping Country,Shipping Name,Shipping Postal Code,Shipping 
State,Status,Timestamp,Tracking Code,Campaign,Medium,Banner
-5.0009,BTC,mic...@mouse.com,1,456 789,,,52 Disney Lane,,Disneyland,US,Mickey 
Mouse,,,,2016-09-15,Pluto,Planet drive,online,mouse-drive
diff --git a/sites/all/modules/offline2civicrm/tests/data/engage.csv 
b/sites/all/modules/offline2civicrm/tests/data/engage.csv
deleted file mode 100644
index 1a55b89..0000000
--- a/sites/all/modules/offline2civicrm/tests/data/engage.csv
+++ /dev/null
@@ -1,49 +0,0 @@
-Banner,Campaign,Medium,Batch,Contribution Type,Total Amount,Source,Postmark 
Date,Received Date,Payment Instrument,Check Number,Restrictions,Gift 
Source,Direct Mail Appeal,Organization Name,Street Address,City,Country,Postal 
Code,Email,State,Thank You Letter Date,AC Flag,Notes,Do Not Email,Do Not 
Phone,Do Not Mail,Do Not SMS,Is Opt Out
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10563,Engage,24,USD
 24.00,5/9/2015,5/9/2015,Cash,1,Unrstricted - General,Corporate Gift,Carl TEST 
Perry,Roombo,53 International 
Circle,Nowe,Poland,,cper...@salon.com,,12/21/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_enWW_dsk_lw_FR,sitenotice,10141,Engage,26,USD
 26.00,7/29/2014,7/29/2014,Cash,2,Unrestricted - General,Corporate 
Gift,Patricia TEST Wilson,Mydo,2664 Schlimgen 
Alley,Iturama,Brazil,,pwils...@4shared.com,,3/13/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10763,Engage,78,USD
 78.00,3/16/2015,3/16/2015,Cash,3,Unrstricted - General,Corporate Gift,Gregory 
TEST Henry,Thoughtbridge,30 Dwight 
Trail,Mojokerto,Indonesia,,ghen...@umich.edu,,7/2/2014,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10631,Engage,26,USD
 26.00,12/9/2014,12/9/2014,Cash,4,Unrstricted - General,Corporate Gift,Kathleen 
TEST Myers,Devcast,742 Arapahoe 
Pass,Klaeng,Thailand,,kmye...@mayoclinic.com,,2/6/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10833,Engage,38,USD
 38.00,5/11/2015,5/11/2015,Cash,5,Unicted - General,Corporate Gift,Robert TEST 
Simpson,Jaloo,22 Maple Lane,Houston,United 
States,77065,rsimps...@unblog.fr,Texas,4/2/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10660,Engage,87,USD
 87.00,6/6/2015,6/6/2015,Cash,6,Unrestricted - General,Corporate Gift,Jimmy 
TEST Payne,Fliptune,4108 Elmside Pass,Johor 
Bahru,Malaysia,80668,jpay...@mozilla.org,Johor,1/3/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_enWW_dsk_lw_FR,sitenotice,10580,Engage,32,USD
 32.00,3/27/2015,3/27/2015,Cash,7,Unrestricted - General,Corporate Gift,Sean 
TEST Campbell,Yakitri,13352 Summer Ridge Street,Santa 
Quitéria,Brazil,,scampbe...@mysql.com,,10/9/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10350,Engage,44,USD
 44.00,6/24/2014,6/24/2014,Cash,8,Unrestricted - General,Corporate Gift,Andrew 
TEST Bryant,Bubbletube,064 Meadow Vale 
Pass,Sydney,Australia,1120,abrya...@blogs.com,New South Wales,8/16/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10374,Engage,75,USD
 75.00,7/15/2014,7/15/2014,Cash,9,Unrestricted - General,Corporate Gift,Paul 
TEST Daniels,Camido,67 7th 
Way,Ghāro,Pakistan,,pdanie...@canalblog.com,,3/3/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10530,Engage,41,USD
 41.00,5/15/2015,5/15/2015,Cash,10,Unrestricted - General,Corporate Gift,Terry 
TEST Barnes,Photobug,2925 Monterey 
Circle,Alegria,Philippines,,tbarn...@soup.io,,10/6/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_enWW_dsk_lw_FR,sitenotice,10149,Engage,74,USD
 74.00,2/25/2015,2/25/2015,Cash,11,Unrestricted - General,Corporate Gift,Joan 
TEST Gordon,Youopia,93777 Hanson Avenue,Al 
Maḩwīt,Yemen,,jgord...@hud.gov,,4/10/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10635,Engage,78,USD
 78.00,3/24/2015,3/24/2015,Cash,12,Unrestricted - General,Corporate Gift,Janice 
TEST Payne,Shuffletag,52976 Pankratz 
Circle,Kolpny,Russia,,jpay...@mozilla.com,,8/12/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10761,Engage,63,USD
 63.00,1/20/2015,1/20/2015,Cash,13,Unrestricted - General,Corporate Gift,Ronald 
TEST Franklin,Mudo,552 Memorial 
Hill,Komono,Japan,,rfrankl...@walmart.com,,1/19/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10840,Engage,85,USD
 85.00,1/17/2015,1/17/2015,Cash,14,Unrestricted - General,Corporate Gift,Janet 
TEST Harper,Youopia,5 Schlimgen 
Alley,Kysyl-Syr,Russia,,jharp...@wix.com,,3/11/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10949,Engage,40,USD
 40.00,3/12/2015,3/12/2015,Cash,15,Unrestricted - General,Corporate Gift,Sara 
TEST Harris,Flashset,6630 Carioca 
Court,Gose,Japan,,sharr...@wired.com,,11/17/2014,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10354,Engage,26,USD
 26.00,7/7/2014,7/7/2014,Cash,16,Unrestricted - General,Corporate Gift,Donna 
TEST Murray,Abata,532 Helena 
Trail,Yudaikelike,China,,dmurr...@friendfeed.com,,1/1/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10527,Engage,76,USD
 76.00,10/25/2014,10/25/2014,Cash,17,Unrestricted - General,Corporate Gift,Anna 
TEST King,Devshare,9725 Hermina 
Way,Pegões,Portugal,2985-209,aki...@is.gd,Setúbal,6/20/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10958,Engage,69,USD
 69.00,8/23/2014,8/23/2014,Cash,18,Unrestricted - General,Corporate Gift,Nancy 
TEST Berry,Youspan,639 Barby 
Circle,Bailizhou,China,,nber...@intel.com,,1/22/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10780,Engage,45,USD
 45.00,10/25/2014,10/25/2014,Cash,19,Unrestricted - General,Corporate Gift,Ruth 
TEST Gibson,Demimbu,0 Prentice 
Pass,Wingham,Canada,,rgibs...@digg.com,,5/26/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10919,Engage,25,USD
 25.00,3/1/2015,3/1/2015,Cash,20,Unrestricted - General,Corporate Gift,Harold 
TEST Miller,Lazzy,910 Heath 
Terrace,KhÅ­jand,Tajikistan,,hmill...@china.com.cn,,9/3/2014,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10132,Engage,16,USD
 16.00,5/7/2015,5/7/2015,Cash,21,Unrestricted - General,Corporate Gift,Laura 
TEST Ryan,Divanoodle,3 Onsgard 
Junction,Promyshlennovskiy,Russia,,lry...@npr.org,,11/30/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10253,Engage,56,USD
 56.00,8/27/2014,8/27/2014,Cash,22,Unrestricted - General,Corporate Gift,Billy 
TEST Ward,Flashdog,6 Miller Trail,Miami,United 
States,33147,bwa...@ox.ac.uk,Florida,1/27/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enWW_dsk_lw_FR,sitenotice,10179,Engage,53,USD
 53.00,6/15/2014,6/15/2014,Cash,23,Unrestricted - General,Corporate 
Gift,Jonathan TEST Howard,Yabox,1973 Debs 
Trail,Kangping,China,,jhowa...@census.gov,,10/6/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10258,Engage,36,USD
 36.00,4/7/2015,4/7/2015,Cash,24,Unrestricted - General,Corporate Gift,Shawn 
TEST Nichols,Zoovu,45700 Heath 
Circle,Gangbei,China,,snicho...@weather.com,,11/3/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10090,Engage,37,USD
 37.00,6/10/2014,6/10/2014,Cash,25,Unrestricted - General,Corporate Gift,Carol 
TEST Peters,Skivee,04 Almo 
Alley,Yaqian,China,,cpete...@feedburner.com,,7/27/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10607,Engage,47,USD
 47.00,8/29/2014,8/29/2014,Cash,26,Unrestricted - General,Corporate Gift,Lori 
TEST Stephens,Myworks,46460 Lakewood Gardens 
Pass,Muriaé,Brazil,,lstephe...@cbc.ca,,11/7/2014,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enWW_dsk_lw_FR,sitenotice,10082,Engage,35,USD
 35.00,5/3/2015,5/3/2015,Cash,27,Unrestricted - General,Corporate Gift,Todd 
TEST Wood,Feedfish,50 Bultman Alley,Casa 
Nova,Portugal,4600-741,two...@miitbeian.gov.cn,Porto,9/5/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10329,Engage,50,USD
 50.00,7/25/2014,7/25/2014,Cash,28,Unresed - General,Corporate Gift,Jane TEST 
Campbell,Jabbersphere,637 Jenifer 
Trail,‘Irbīn,Syria,,jcampbe...@imgur.com,,10/14/2014,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enWW_dsk_lw_FR,sitenotice,10213,Engage,78,USD
 78.00,8/4/2014,8/4/2014,Cash,29,Unrestricted - General,Corporate Gift,Carlos 
TEST Wells,Yombu,046 Haas 
Hill,Tagoloan,Philippines,,cwel...@ifeng.com,,9/24/2014,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10176,Engage,59,USD
 59.00,10/6/2014,10/6/2014,Cash,30,Unrestricted - General,Corporate 
Gift,Rebecca TEST Robinson,Dablist,06 Leroy Crossing,Bicurga,Equatorial 
Guinea,,rrobins...@wufoo.com,,5/20/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10144,Engage,4,USD
 4.00,7/2/2014,7/2/2014,Cash,31,Unrestricted - General,Corporate Gift,Karen 
TEST Hanson,Skyble,0023 Chive Center,Buffalo,United 
States,14205,khans...@amazon.co.uk,New York,12/13/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10426,Engage,5,USD
 5.00,1/19/2015,1/19/2015,Cash,32,Unrestricted - General,Corporate Gift,Bruce 
TEST Stevens,Pixope,97 Prairieview 
Place,Zabrat,Azerbaijan,,bsteve...@washington.edu,,6/25/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10384,Engage,38,USD
 38.00,6/1/2015,6/1/2015,Cash,33,Unrestricted - General,Corporate Gift,Margaret 
TEST Richardson,Yata,2300 Lakewood 
Street,Kenyau,Indonesia,,mrichards...@aol.com,,7/27/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_enWW_dsk_lw_FR,sitenotice,10808,Engage,78,USD
 78.00,10/22/2014,10/22/2014,Cash,34,Unrestricted - General,Corporate Gift,Anna 
TEST Webb,Jaxworks,39 Gina 
Junction,Jorong,Indonesia,,awe...@bloglovin.com,,4/30/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10472,Engage,9,USD
 9.00,7/17/2014,7/17/2014,Cash,35,Unrestricted - General,Corporate Gift,Kelly 
TEST Harris,Vitz,0985 Commercial 
Avenue,Guandi,China,,kharr...@themeforest.net,,9/19/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10472,Engage,93,USD
 93.00,9/16/2014,9/16/2014,Cash,36,Unred - General,Corporate Gift,Ronald TEST 
Richards,Lajo,538 Debs Pass,Mautapaga 
Bawah,Indonesia,,rrichar...@toplist.cz,,12/3/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10430,Engage,28,USD
 28.00,3/9/2015,3/9/2015,Cash,37,Unrestricted - General,Corporate Gift,Craig 
TEST Mccoy,Feedspan,5425 Dottie 
Road,Kebili,Tunisia,,cmcco...@house.gov,,3/27/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enWW_dsk_lw_FR,sitenotice,10916,Engage,62,USD
 62.00,2/5/2015,2/5/2015,Cash,38,Unrestricted - General,Corporate Gift,Emily 
TEST Bell,Roodel,11 Comanche Alley,Al 
Ḩarajah,Yemen,,ebel...@lulu.com,,5/29/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10198,Engage,23,USD
 23.00,4/24/2015,4/24/2015,Cash,39,Unrestricted - General,Corporate 
Gift,Marilyn TEST Rodriguez,Voomm,921 Lindbergh 
Alley,Huomachong,China,,mrodrigue...@shop-pro.jp,,6/21/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10163,Engage,98,USD
 98.00,3/12/2015,3/12/2015,Cash,40,Unrestricted - General,Corporate Gift,Fred 
TEST Armstrong,Chatterpoint,597 Tennyson Road,Casal da 
Serra,Portugal,2560-057,farmstron...@cnbc.com,Lisboa,12/27/2014,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enWW_dsk_lw_FR,sitenotice,10436,Engage,29,USD
 29.00,2/26/2015,2/26/2015,Cash,41,Unrestricted - General,Corporate Gift,Carl 
TEST Lopez,Browsetype,19 Shelley 
Center,Domašinec,Croatia,,clope...@freewebs.com,,3/1/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10575,Engage,24,USD
 24.00,3/28/2015,3/28/2015,Cash,42,Unrestricted - General,Corporate Gift,Donald 
TEST Rodriguez,Mymm,55 Scoville 
Court,Ladner,Canada,,drodrigue...@jugem.jp,,5/16/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10143,Engage,100,USD
 100.00,7/28/2014,7/28/2014,Cash,43,Unrestricted - General,Corporate Gift,Carol 
TEST Wright,Skibox,9 Hanover 
Drive,Nakanojōmachi,Japan,,cwrigh...@parallels.com,,10/21/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10197,Engage,95,USD
 95.00,6/25/2014,6/25/2014,Cash,44,Unrestricted - General,Corporate 
Gift,Melissa TEST Olson,Buzzshare,14025 Weeping Birch 
Park,Volodymyrets’,Ukraine,,molso...@geocities.jp,,9/3/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10155,Engage,94,USD
 94.00,2/19/2015,2/19/2015,Cash,45,Unrestricted - General,Corporate Gift,Nancy 
TEST Vasquez,Gabvine,135 Anderson 
Street,Imtarfa,Malta,,nvasque...@state.gov,,4/7/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10890,Engage,30,USD
 30.00,2/10/2015,2/10/2015,Cash,46,Unrestricted - General,Corporate Gift,Lisa 
TEST Harrison,Gigashots,45322 Service 
Way,Bovec,Slovenia,,lharriso...@theglobeandmail.com,,6/1/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_enWW_dsk_lw_FR,sitenotice,10392,Engage,33,USD
 33.00,11/13/2014,11/13/2014,Cash,47,Unrestricted - General,Corporate 
Gift,Wanda TEST Vasquez,Ntag,067 Declaration 
Lane,Buk,Poland,,wvasque...@behance.net,,10/16/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_enWW_dsk_lw_FR,sitenotice,10673,Engage,82,USD
 82.00,4/2/2015,4/2/2015,Cash,48,Unrestricted - General,Corporate Gift,Amy TEST 
Richardson,Nlounge,64513 Anhalt 
Parkway,Minchinābād,Pakistan,,arichardso...@is.gd,,1/6/2015,,,,,,,
diff --git a/sites/all/modules/offline2civicrm/tests/data/engage_postal.csv 
b/sites/all/modules/offline2civicrm/tests/data/engage_postal.csv
deleted file mode 100644
index 138afc6..0000000
--- a/sites/all/modules/offline2civicrm/tests/data/engage_postal.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-Banner,Campaign,Medium,Batch,Contribution Type,Total Amount,Source,Postmark 
Date,Received Date,Payment Instrument,Check Number,Restrictions,Gift 
Source,Direct Mail Appeal,Organization Name,Street Address,City,Country,Postal 
Code,Email,State,Thank You Letter Date,AC Flag,Notes,Do Not Email,Do Not 
Phone,Do Not Mail,Do Not SMS,Is Opt Out
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10833,Engage,38,USD
 38.00,5/11/2015,5/11/2015,Cash,5,Unrestricted - General,Corporate Gift,Robert 
TEST Simpson,Jaloo,22 Maple Lane,Houston,United 
States,7065,rsimps...@unblog.fr,Texas,4/2/2015,,,,,,,
diff --git a/sites/all/modules/offline2civicrm/tests/data/engage_reduced.csv 
b/sites/all/modules/offline2civicrm/tests/data/engage_reduced.csv
deleted file mode 100644
index cd2d2f3..0000000
--- a/sites/all/modules/offline2civicrm/tests/data/engage_reduced.csv
+++ /dev/null
@@ -1,19 +0,0 @@
-Banner,Campaign,Medium,Batch,Contribution Type,Total Amount,Source,Postmark 
Date,Received Date,Payment Instrument,Check Number,Restrictions,Gift 
Source,Direct Mail Appeal,Organization Name,Street Address,City,Country,Postal 
Code,Email,State,Thank You Letter Date,AC Flag,Notes,Do Not Email,Do Not 
Phone,Do Not Mail,Do Not SMS,Is Opt Out
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10563,Engage,24,USD
 24.00,5/9/2015,5/9/2015,Cash,1,Unrstricted - General,Corporate Gift,Carl TEST 
Perry,Roombo,53 International 
Circle,Nowe,Poland,,cper...@salon.com,,12/21/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_enWW_dsk_lw_FR,sitenotice,10141,Engage,26,USD
 26.00,7/29/2014,7/29/2014,Cash,2,Unrestricted - General,Corporate 
Gift,Patricia TEST Wilson,Mydo,2664 Schlimgen 
Alley,Iturama,Brazil,,pwils...@4shared.com,,3/13/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_enWW_dsk_lw_FR,sitenotice,10141,Engage,26,USD
 26.00,7/29/2014,7/29/2014,Cash,2,Unrestricted - General,Corporate 
Gift,Patricia TEST Wilson,Mydo,2664 Schlimgen 
Alley,Iturama,Brazil,,pwils...@4shared.com,,3/13/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10631,Engage,26,USD
 26.00,12/9/2014,12/9/2014,Cash,4,Unrstricted - General,Corporate Gift,Kathleen 
TEST Myers,Devcast,742 Arapahoe 
Pass,Klaeng,Thailand,,kmye...@mayoclinic.com,,2/6/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10833,Engage,38,USD
 38.00,5/11/2015,5/11/2015,Cash,5,Unicted - General,Corporate Gift,Robert TEST 
Simpson,Jaloo,22 Maple Lane,Houston,United 
States,77065,rsimps...@unblog.fr,Texas,4/2/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10660,Engage,87,USD
 87.00,6/6/2015,6/6/2015,Cash,6,Unrestricted - General,Corporate Gift,Jimmy 
TEST Payne,Fliptune,4108 Elmside Pass,Johor 
Bahru,Malaysia,80668,jpay...@mozilla.org,Johor,1/3/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_enWW_dsk_lw_FR,sitenotice,10580,Engage,32,USD
 32.00,3/27/2015,3/27/2015,Cash,7,Unrestricted - General,Corporate Gift,Sean 
TEST Campbell,Yakitri,13352 Summer Ridge Street,Santa 
Quitéria,Brazil,,scampbe...@mysql.com,,10/9/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10350,Engage,44,USD
 44.00,6/24/2014,6/24/2014,Cash,8,Unrestricted - General,Corporate Gift,Andrew 
TEST Bryant,Bubbletube,064 Meadow Vale 
Pass,Sydney,Australia,1120,abrya...@blogs.com,New South Wales,8/16/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10374,Engage,75,USD
 75.00,7/15/2014,7/15/2014,Cash,9,Unrestricted - General,Corporate Gift,Paul 
TEST Daniels,Camido,67 7th 
Way,Ghāro,Pakistan,,pdanie...@canalblog.com,,3/3/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10530,Engage,41,USD
 41.00,5/15/2015,5/15/2015,Cash,10,Unrestricted - General,Corporate Gift,Terry 
TEST Barnes,Photobug,2925 Monterey 
Circle,Alegria,Philippines,,tbarn...@soup.io,,10/6/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_enWW_dsk_lw_FR,sitenotice,10149,Engage,74,USD
 74.00,2/25/2015,2/25/2015,Cash,11,Unrestricted - General,Corporate Gift,Joan 
TEST Gordon,Youopia,93777 Hanson Avenue,Al 
Maḩwīt,Yemen,,jgord...@hud.gov,,4/10/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10635,Engage,78,USD
 78.00,3/24/2015,3/24/2015,Cash,12,Unrestricted - General,Corporate Gift,Janice 
TEST Payne,Shuffletag,52976 Pankratz 
Circle,Kolpny,Russia,,jpay...@mozilla.com,,8/12/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10761,Engage,63,USD
 63.00,1/20/2015,1/20/2015,Cash,13,Unrestricted - General,Corporate Gift,Ronald 
TEST Franklin,Mudo,552 Memorial 
Hill,Komono,Japan,,rfrankl...@walmart.com,,1/19/2015,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10840,Engage,85,USD
 85.00,1/17/2015,1/17/2015,Cash,14,Unrestricted - General,Corporate Gift,Janet 
TEST Harper,Youopia,5 Schlimgen 
Alley,Kysyl-Syr,Russia,,jharp...@wix.com,,3/11/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10949,Engage,40,USD
 40.00,3/12/2015,3/12/2015,Cash,15,Unrestricted - General,Corporate Gift,Sara 
TEST Harris,Flashset,6630 Carioca 
Court,Gose,Japan,,sharr...@wired.com,,11/17/2014,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10354,Engage,26,USD
 26.00,7/7/2014,7/7/2014,Cash,16,Unrestricted - General,Corporate Gift,Donna 
TEST Murray,Abata,532 Helena 
Trail,Yudaikelike,China,,dmurr...@friendfeed.com,,1/1/2015,,,,,,,
-B15_0323_enmlWW_mob_lw_dnow_btn.no-LP.cc,C15_mlWW_mob_lw_FR,sitenotice,10527,Engage,76,USD
 76.00,10/25/2014,10/25/2014,Cash,17,Unrestricted - General,Corporate Gift,Anna 
TEST King,Devshare,9725 Hermina 
Way,Pegões,Portugal,2985-209,aki...@is.gd,Setúbal,6/20/2014,,,,,,,
-B15_0601_enlvroskLVROSK_dsk_lg_nag_sd.no-LP.cc,C15_enlvroskLVROSK_dsk_FR,sitenotice,10958,Engage,69,USD
 69.00,8/23/2014,8/23/2014,Cash,18,Unrestricted - General,Corporate Gift,Nancy 
TEST Berry,Youspan,639 Barby 
Circle,Bailizhou,China,,nber...@intel.com,,1/22/2015,,,,,,,
diff --git 
a/sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php 
b/sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php
deleted file mode 100644
index e20db09..0000000
--- a/sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<<<<<<< HEAD   (f78c89 Update PHPMailer)
-=======
-<?php
-
-class BaseChecksFileTest extends BaseWmfDrupalPhpUnitTestCase {
-  /**
-   * Gateway.
-   *
-   * eg. jpmorgan, paypal etc.
-   *
-   * @var string
-   */
-    protected $gateway;
-
-  /**
-   * Transaction id being worked with. This is combined with the gateway for 
the civi trxn_id.
-   *
-   * @var string
-   */
-    protected $trxn_id;
-    /**
-     * Test and remove some dynamic fields, to simplify test fixtures.
-     */
-    function stripSourceData( &$msg ) {
-        $this->assertEquals( 'direct', $msg['source_type'] );
-        $importerClass = str_replace( 'Test', 'Probe', get_class( $this ) );
-        $this->assertEquals( "Offline importer: {$importerClass}", 
$msg['source_name'] );
-        $this->assertNotNull( $msg['source_host'] );
-        $this->assertGreaterThan( 0, $msg['source_run_id'] );
-        $this->assertNotNull( $msg['source_version'] );
-        $this->assertGreaterThan( 0, $msg['source_enqueued_time'] );
-
-        unset( $msg['source_type'] );
-        unset( $msg['source_name'] );
-        unset( $msg['source_host'] );
-        unset( $msg['source_run_id'] );
-        unset( $msg['source_version'] );
-        unset( $msg['source_enqueued_time'] );
-    }
-
-    /**
-     * Clean up transactions from previous test runs.
-     */
-    function doCleanUp() {
-      $contributions = 
wmf_civicrm_get_contributions_from_gateway_id($this->gateway, $this->trxn_id);
-      if ($contributions) {
-        foreach ($contributions as $contribution) {
-          $this->callAPISuccess('Contribution', 'delete', array('id' => 
$contribution['id']));
-        }
-      }
-    }
-}
->>>>>>> BRANCH (768b0e Pull composer changes from deployment)
diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
deleted file mode 100644
index 585d75e..0000000
--- a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
+++ /dev/null
@@ -1,477 +0,0 @@
-<<<<<<< HEAD   (f78c89 Update PHPMailer)
-=======
-<?php
-
-use queue2civicrm\DonationQueueConsumer;
-use queue2civicrm\refund\RefundQueueConsumer;
-use queue2civicrm\recurring\RecurringQueueConsumer;
-use SmashPig\Core\Context;
-use SmashPig\Core\DataStores\PendingDatabase;
-use SmashPig\Tests\SmashPigDatabaseTestConfiguration;
-
-/**
- * @group Pipeline
- * @group Queue2Civicrm
- */
-class ProcessMessageTest extends BaseWmfDrupalPhpUnitTestCase {
-       /**
-        * @var PendingDatabase
-        */
-       protected $pendingDb;
-
-       /**
-        * @var DonationQueueConsumer
-        */
-       protected $queueConsumer;
-
-       /**
-        * @var RefundQueueConsumer
-        */
-       protected $refundConsumer;
-
-       /**
-        * @var RecurringQueueConsumer
-        */
-       protected $recurringConsumer;
-
-       public function setUp() {
-               parent::setUp();
-               $config = SmashPigDatabaseTestConfiguration::instance();
-               // FIXME: Use all-purpose SmashPig test config when ready
-               $config->override( array(
-                       'data-store' => array(
-                               'donations' => array(
-                                       'class' => 'PHPQueue\Backend\PDO',
-                                       'constructor-parameters' => array( 
array(
-                                               'connection_string' => 
'sqlite::memory:'
-                                       ) )
-                               ),
-                               'refund-new' => array(
-                                       'class' => 'PHPQueue\Backend\PDO',
-                                       'constructor-parameters' => array( 
array(
-                                               'connection_string' => 
'sqlite::memory:'
-                                       ) )
-                               ),
-                               'recurring-new' => array(
-                                       'class' => 'PHPQueue\Backend\PDO',
-                                       'constructor-parameters' => array( 
array(
-                                               'connection_string' => 
'sqlite::memory:'
-                                       ) )
-                               ),
-                       )
-               ) );
-               Context::initWithLogger( $config );
-               $this->pendingDb = PendingDatabase::get();
-               $this->pendingDb->createTable();
-               $this->queueConsumer = new DonationQueueConsumer( 'donations' );
-               $this->refundConsumer = new RefundQueueConsumer( 'refund-new' );
-               $this->recurringConsumer = new RecurringQueueConsumer( 
'recurring-new' );
-       }
-
-    /**
-     * Process an ordinary (one-time) donation message
-     */
-    public function testDonation() {
-        $message = new TransactionMessage(array('gross' => 400, 
'original_gross' => 400, 'original_currency' => 'USD'));
-        $message2 = new TransactionMessage();
-
-        exchange_rate_cache_set( 'USD', $message->get( 'date' ), 1 );
-        exchange_rate_cache_set( $message->get( 'currency' ), $message->get( 
'date' ), 3 );
-
-        $this->queueConsumer->processMessage( $message->getBody() );
-        $this->queueConsumer->processMessage( $message2->getBody() );
-
-        $contribution = civicrm_api3('Contribution', 'getsingle', array(
-          wmf_civicrm_get_custom_field_name('gateway_txn_id') => 
$message->getGatewayTxnId(),
-          'return' => array(wmf_civicrm_get_custom_field_name('Campaign'), 
'total_amount'),
-        ));
-        
$this->assertEmpty($contribution[wmf_civicrm_get_custom_field_name('campaign')] 
);
-
-        $contribution2 = civicrm_api3('Contribution', 'getsingle', array(
-          wmf_civicrm_get_custom_field_name('gateway_txn_id') => 
$message2->getGatewayTxnId(),
-          'return' => array(wmf_civicrm_get_custom_field_name('Campaign'), 
'total_amount'),
-        ));
-
-        $this->assertEquals('Benefactor Gift', 
$contribution2[wmf_civicrm_get_custom_field_name('campaign')] );
-
-        $this->assertNotEquals( $contribution['contact_id'], 
$contribution2['contact_id'] );
-    }
-
-    /**
-     * Process an ordinary (one-time) donation message with an UTF campaign.
-     */
-    public function testDonationWithUTFCampaignOption() {
-        $message = new TransactionMessage(array('utm_campaign' => 
'EmailCampaign1'));
-        $appealFieldID = $this->createCustomOption('Appeal', 'EmailCampaign1');
-
-        exchange_rate_cache_set( 'USD', $message->get( 'date' ), 1 );
-        exchange_rate_cache_set( $message->get( 'currency' ), $message->get( 
'date' ), 3 );
-
-        $this->queueConsumer->processMessage( $message->getBody()  );
-
-        $contributions = wmf_civicrm_get_contributions_from_gateway_id( 
$message->getGateway(), $message->getGatewayTxnId() );
-        $contribution = civicrm_api3('Contribution', 'getsingle', array(
-            'id' => $contributions[0]['id'],
-            'return' => 'custom_' . $appealFieldID,
-        ));
-      $this->assertEquals('EmailCampaign1', $contribution['custom_' . 
$appealFieldID]);
-        $this->deleteCustomOption('Appeal', 'EmailCampaign1');
-    }
-
-  /**
-   * Process an ordinary (one-time) donation message with an UTF campaign not 
already existing.
-   */
-  public function testDonationWithInvalidUTFCampaignOption() {
-      civicrm_initialize();
-      $optionValue = uniqid();
-      $message = new TransactionMessage(array('utm_campaign' => $optionValue));
-      $appealField = civicrm_api3('custom_field', 'getsingle', array('name' => 
'Appeal'));
-
-      exchange_rate_cache_set('USD', $message->get('date'), 1);
-      exchange_rate_cache_set($message->get('currency'), 
$message->get('date'), 3);
-
-      $this->queueConsumer->processMessage( $message->getBody()  );
-
-      $contributions = 
wmf_civicrm_get_contributions_from_gateway_id($message->getGateway(), 
$message->getGatewayTxnId());
-      $contribution = civicrm_api3('Contribution', 'getsingle', array(
-        'id' => $contributions[0]['id'],
-        'return' => 'custom_' . $appealField['id'],
-      ));
-      $this->assertEquals($optionValue, $contribution['custom_' . 
$appealField['id']]);
-      $this->deleteCustomOption('Appeal', $optionValue);
-  }
-
-  /**
-   * Process an ordinary (one-time) donation message with an UTF campaign 
previously disabled.
-   */
-  public function testDonationWithDisabledUTFCampaignOption() {
-    civicrm_initialize();
-    $optionValue = uniqid();
-    $message = new TransactionMessage(array('utm_campaign' => $optionValue));
-    $appealFieldID = $this->createCustomOption('Appeal', $optionValue, FALSE);
-
-    exchange_rate_cache_set('USD', $message->get('date'), 1);
-    exchange_rate_cache_set($message->get('currency'), $message->get('date'), 
3);
-
-    $this->queueConsumer->processMessage( $message->getBody() );
-
-    $contributions = 
wmf_civicrm_get_contributions_from_gateway_id($message->getGateway(), 
$message->getGatewayTxnId());
-    $contribution = civicrm_api3('Contribution', 'getsingle', array(
-      'id' => $contributions[0]['id'],
-      'return' => 'custom_' . $appealFieldID,
-    ));
-    $this->assertEquals($optionValue, $contribution['custom_' . 
$appealFieldID]);
-    $this->deleteCustomOption('Appeal', $optionValue);
-  }
-
-  /**
-   * Process an ordinary (one-time) donation message with an UTF campaign with 
a different label.
-   */
-  public function testDonationWithDifferentLabelUTFCampaignOption() {
-    civicrm_initialize();
-    $optionValue = uniqid();
-    $message = new TransactionMessage(array('utm_campaign' => $optionValue));
-    $appealFieldID = $this->createCustomOption('Appeal', $optionValue, TRUE, 
uniqid());
-
-    exchange_rate_cache_set('USD', $message->get('date'), 1);
-    exchange_rate_cache_set($message->get('currency'), $message->get('date'), 
3);
-
-    $this->queueConsumer->processMessage( $message->getBody() );
-
-    $contributions = 
wmf_civicrm_get_contributions_from_gateway_id($message->getGateway(), 
$message->getGatewayTxnId());
-    $contribution = civicrm_api3('Contribution', 'getsingle', array(
-      'id' => $contributions[0]['id'],
-      'return' => 'custom_' . $appealFieldID,
-    ));
-    $this->assertEquals($optionValue, $contribution['custom_' . 
$appealFieldID]);
-    $values = $this->callAPISuccess('OptionValue', 'get', array('value' => 
$optionValue));
-    $this->assertEquals(1, $values['count']);
-    $this->deleteCustomOption('Appeal', $optionValue);
-  }
-
-  /**
-   * Create a custom option for the given field.
-   *
-   * @param string $fieldName
-   *
-   * @param string $optionValue
-   * @param bool $is_active
-   *   Is the option value enabled.
-   *
-   * @return mixed
-   * @throws \CiviCRM_API3_Exception
-   */
-    public function createCustomOption($fieldName, $optionValue, $is_active = 
1, $label = NULL) {
-        if (!$label) {
-          $label = $optionValue;
-        }
-        $appealField = civicrm_api3('custom_field', 'getsingle', array('name' 
=> $fieldName));
-        civicrm_api3('OptionValue', 'create', array(
-          'name' => $label,
-          'value' => $optionValue,
-          'option_group_id' => $appealField['option_group_id'],
-          'is_active' => $is_active,
-        ));
-        
civicrm_api_option_group(wmf_civicrm_get_direct_mail_field_option_name(), null, 
TRUE);
-        return $appealField['id'];
-    }
-
-    /**
-     * Cleanup custom field option after test.
-     *
-     * @param string $fieldName
-     *
-     * @param string $optionValue
-     *
-     * @return mixed
-     * @throws \CiviCRM_API3_Exception
-     */
-    public function deleteCustomOption($fieldName, $optionValue) {
-        $appealField = civicrm_api3('custom_field', 'getsingle', array('name' 
=> $fieldName));
-        return $appealField['id'];
-    }
-
-    public function testRecurring() {
-        civicrm_initialize();
-        $subscr_id = mt_rand();
-        $values = $this->processRecurringSignup($subscr_id);
-
-        $message = new RecurringPaymentMessage( $values );
-        $message2 = new RecurringPaymentMessage( $values );
-
-        $payment_time = strtotime( $message->get( 'payment_date' ) );
-        exchange_rate_cache_set( 'USD', $payment_time, 1 );
-        exchange_rate_cache_set( $message->get('mc_currency'), $payment_time, 
3 );
-
-        $msg = $message->getBody();
-        db_insert('contribution_tracking')
-          ->fields(array('id' => $msg['custom']))
-        ->execute();
-
-        $this->recurringConsumer->processMessage($msg);
-        $this->recurringConsumer->processMessage( $message2->getBody() );
-
-        $recur_record = wmf_civicrm_get_recur_record( $subscr_id );
-        $this->assertNotEquals( false, $recur_record );
-
-        $contributions = wmf_civicrm_get_contributions_from_gateway_id( 
$message->getGateway(), $message->getGatewayTxnId() );
-        $this->assertEquals( 1, count( $contributions ) );
-        $this->assertEquals( $recur_record->id, 
$contributions[0]['contribution_recur_id']);
-
-        $contributions2 = wmf_civicrm_get_contributions_from_gateway_id( 
$message2->getGateway(), $message2->getGatewayTxnId() );
-        $this->assertEquals( 1, count( $contributions2 ) );
-        $this->assertEquals( $recur_record->id, 
$contributions2[0]['contribution_recur_id']);
-
-        $this->assertEquals( $contributions[0]['contact_id'], 
$contributions2[0]['contact_id'] );
-        $addresses = $this->callAPISuccess('Address', 'get', 
array('contact_id' => $contributions2[0]['contact_id']));
-        $this->assertEquals(1, $addresses['count']);
-        // The address comes from the recurring_payment.json not the 
recurring_signup.json as it
-        // has been overwritten. This is perhaps not a valid scenario in 
production but it is
-        // the scenario the code works to. In production they would probably 
always be the same.
-        $this->assertEquals('1211122 132 st', 
$addresses['values'][$addresses['id']]['street_address']);
-
-        $emails = $this->callAPISuccess('Email', 'get', array('contact_id' => 
$contributions2[0]['contact_id']));
-        $this->assertEquals(1, $addresses['count']);
-        $this->assertEquals('test...@wikimedia.org', 
$emails['values'][$emails['id']]['email']);
-
-        db_delete('contribution_tracking')
-        ->condition('id', $msg['custom'])
-        ->execute();
-    }
-
-    /**
-     *  Test that the a blank address is not written to the DB.
-     */
-    public function testRecurringBlankEmail() {
-      civicrm_initialize();
-      $subscr_id = mt_rand();
-      $values = $this->processRecurringSignup($subscr_id);
-
-      $message = new RecurringPaymentMessage($values);
-      $this->setExchangeRates($message->get('payment_date'), array('USD' => 1, 
$message->get('mc_currency') => 3));
-      $messageBody = $message->getBody();
-
-      $addressFields = array('address_city', "address_country_code", 
"address_country", "address_state","address_street", "address_zip");
-      foreach ($addressFields as $addressField) {
-        $messageBody[$addressField] = '';
-      }
-
-      db_insert('contribution_tracking')
-        ->fields(array('id' => $messageBody['custom']))
-        ->execute();
-
-      $this->recurringConsumer->processMessage($messageBody);
-
-      $contributions = wmf_civicrm_get_contributions_from_gateway_id(
-        $message->getGateway(),
-        $message->getGatewayTxnId()
-      );
-      $addresses = $this->callAPISuccess('Address', 'get', array('contact_id' 
=> $contributions[0]['contact_id'], 'sequential' => 1));
-      $this->assertEquals(1, $addresses['count']);
-      // The address created by the sign up (Lockwood Rd) should not have been 
overwritten by the blank.
-      $this->assertEquals('5109 Lockwood Rd', 
$addresses['values'][0]['street_address']);
-    }
-
-    /**
-     * @expectedException WmfException
-     * @expectedExceptionCode WmfException::MISSING_PREDECESSOR
-     */
-    public function testRecurringNoPredecessor() {
-        $message = new RecurringPaymentMessage( array(
-            'subscr_id' => mt_rand(),
-        ) );
-
-        $payment_time = strtotime( $message->get( 'payment_date' ) );
-        exchange_rate_cache_set( 'USD', $payment_time, 1 );
-        exchange_rate_cache_set( $message->get('mc_currency'), $payment_time, 
3 );
-
-        $this->recurringConsumer->processMessage( $message->getBody() );
-    }
-
-    /**
-     * @expectedException WmfException
-     * @expectedExceptionCode WmfException::INVALID_RECURRING
-     */
-    public function testRecurringNoSubscrId() {
-        $message = new RecurringPaymentMessage( array(
-            'subscr_id' => null,
-        ) );
-
-        $payment_time = strtotime( $message->get( 'payment_date' ) );
-        exchange_rate_cache_set( 'USD', $payment_time, 1 );
-        exchange_rate_cache_set( $message->get('mc_currency'), $payment_time, 
3 );
-
-        $this->recurringConsumer->processMessage( $message->getBody() );
-    }
-
-    public function testRefund() {
-        $donation_message = new TransactionMessage();
-        $refund_message = new RefundMessage( array(
-            'gateway' => $donation_message->getGateway(),
-            'gateway_parent_id' => $donation_message->getGatewayTxnId(),
-            'gateway_refund_id' => mt_rand(),
-            'gross' => $donation_message->get( 'original_gross' ),
-            'gross_currency' => $donation_message->get( 'original_currency' ),
-        ) );
-
-        exchange_rate_cache_set( 'USD', $donation_message->get('date'), 1 );
-        exchange_rate_cache_set( $donation_message->get('currency'), 
$donation_message->get('date'), 3 );
-
-        $this->queueConsumer->processMessage( $donation_message->getBody() );
-        $contributions = wmf_civicrm_get_contributions_from_gateway_id( 
$donation_message->getGateway(), $donation_message->getGatewayTxnId() );
-        $this->assertEquals( 1, count( $contributions ) );
-
-       $this->refundConsumer->processMessage( $refund_message->getBody() );
-        $contributions = wmf_civicrm_get_contributions_from_gateway_id( 
$refund_message->getGateway(), $refund_message->getGatewayTxnId() );
-        $this->assertEquals( 1, count( $contributions ) );
-    }
-
-    /**
-     * @expectedException WmfException
-     * @expectedExceptionCode WmfException::MISSING_PREDECESSOR
-     */
-    public function testRefundNoPredecessor() {
-        $refund_message = new RefundMessage();
-
-       $this->refundConsumer->processMessage( $refund_message->getBody() );
-    }
-
-    /**
-     * Test refunding a mismatched amount.
-     *
-     * Note that we were checking against an exception - but it turned out the 
exception
-     * could be thrown in this fn $this->queueConsumer->processMessage if the 
exchange rate does not
-     * exist - which is not what we are testing for.
-     */
-    public function testRefundMismatched() {
-        $this->setExchangeRates(1234567, array( 'USD' => 1, 'PLN' => 0.5 ) );
-        $donation_message = new TransactionMessage( array(
-            'gateway' => 'test_gateway',
-            'gateway_txn_id' => mt_rand(),
-        ) );
-        $refund_message = new RefundMessage( array(
-            'gateway' => 'test_gateway',
-            'gateway_parent_id' => $donation_message->getGatewayTxnId(),
-            'gateway_refund_id' => mt_rand(),
-            'gross' => $donation_message->get( 'original_gross' ) + 1,
-            'gross_currency' => $donation_message->get( 'original_currency' ),
-        ) );
-
-        $this->queueConsumer->processMessage( $donation_message->getBody() );
-        $contributions = wmf_civicrm_get_contributions_from_gateway_id( 
$donation_message->getGateway(), $donation_message->getGatewayTxnId() );
-        $this->assertEquals( 1, count( $contributions ) );
-
-       $this->refundConsumer->processMessage( $refund_message->getBody() );
-        $contributions = $this->callAPISuccess('Contribution', 'get', 
array('contact_id' => $contributions[0]['contact_id'], 'sequential' => 1));
-        $this->assertEquals(2, count($contributions['values']));
-        $this->assertEquals('Chargeback', 
CRM_Contribute_PseudoConstant::contributionStatus($contributions['values'][0]['contribution_status_id']));
-        $this->assertEquals('-.5', 
$contributions['values'][1]['total_amount']);
-    }
-
-       /**
-        * Process a donation message with some info from pending db
-        * @dataProvider getSparseMessages
-        * @param TransactionMessage $message
-        * @param array $pendingMessage
-        */
-       public function testDonationSparseMessages( $message, $pendingMessage ) 
{
-               $pendingMessage['order_id'] = $message->get( 'order_id' );
-               $this->pendingDb->storeMessage( $pendingMessage );
-               $appealFieldID = $this->createCustomOption(
-                       'Appeal', $pendingMessage['utm_campaign'], false
-               );
-
-               exchange_rate_cache_set( 'USD', $message->get( 'date' ), 1 );
-               exchange_rate_cache_set( $message->get( 'currency' ), 
$message->get( 'date' ), 3 );
-
-               $this->queueConsumer->processMessage( $message->getBody()  );
-
-               $contributions = wmf_civicrm_get_contributions_from_gateway_id( 
$message->getGateway(), $message->getGatewayTxnId() );
-               $contribution = civicrm_api3('Contribution', 'getsingle', array(
-                       'id' => $contributions[0]['id'],
-                       'return' => 'custom_' . $appealFieldID,
-               ));
-               $this->assertEquals( $pendingMessage['utm_campaign'], 
$contribution['custom_' . $appealFieldID]);
-               $this->deleteCustomOption('Appeal', 
$pendingMessage['utm_campaign']);
-               $pendingEntry = $this->pendingDb->fetchMessageByGatewayOrderId(
-                       $message->get( 'gateway' ), $pendingMessage['order_id']
-               );
-               $this->assertNull( $pendingEntry, 'Should have deleted pending 
DB entry' );
-               civicrm_api3( 'Contribution', 'delete', array( 'id' => 
$contributions[0]['id'] ) );
-               civicrm_api3( 'Contact', 'delete', array( 'id' => 
$contributions[0]['contact_id'] ) );
-       }
-
-       public function getSparseMessages() {
-               return array(
-                       array(
-                               new AmazonDonationMessage(),
-                               json_decode(
-                                       file_get_contents( __DIR__ . 
'/../data/pending_amazon.json'), true
-                               )
-                       ),
-                       array(
-                               new AstroPayDonationMessage(),
-                               json_decode(
-                                       file_get_contents( __DIR__ . 
'/../data/pending_astropay.json'), true
-                               )
-                       ),
-               );
-       }
-
-  /**
-   * Process the original recurring sign up message.
-   *
-   * @param string $subscr_id
-   * @return array
-   */
-  private function processRecurringSignup($subscr_id) {
-    $values = array('subscr_id' => $subscr_id);
-    $signup_message = new RecurringSignupMessage($values);
-    $subscr_time = strtotime($signup_message->get('subscr_date'));
-    exchange_rate_cache_set('USD', $subscr_time, 1);
-    exchange_rate_cache_set($signup_message->get('mc_currency'), $subscr_time, 
3);
-    $this->recurringConsumer->processMessage($signup_message->getBody());
-    return $values;
-  }
-}
->>>>>>> BRANCH (768b0e Pull composer changes from deployment)
diff --git 
a/sites/all/modules/wmf_civicrm/tests/phpunit/HelperFunctionsTest.php 
b/sites/all/modules/wmf_civicrm/tests/phpunit/HelperFunctionsTest.php
deleted file mode 100644
index 7354ac9..0000000
--- a/sites/all/modules/wmf_civicrm/tests/phpunit/HelperFunctionsTest.php
+++ /dev/null
@@ -1,105 +0,0 @@
-<<<<<<< HEAD   (f78c89 Update PHPMailer)
-=======
-<?php
-
-/**
- * @group WmfCivicrm
- */
-class HelperFunctionsTest extends BaseWmfDrupalPhpUnitTestCase {
-
-    /**
-     * Test wmf_civicrm_tag_contact_for_review.
-     *
-     * Maintenance note: the civicrm entity_tag get api returns an odd syntax.
-     *
-     * If that ever gets fixed it may break this test - but only the test would
-     * need to be altered to adapt.
-     *
-     * @throws \CiviCRM_API3_Exception
-     */
-    public function testTagContactForReview() {
-        civicrm_initialize();
-        $contact = civicrm_api3('Contact', 'create', array(
-            'contact_type' => 'Organization',
-            'organization_name' => 'The Evil Empire',
-        ));
-        wmf_civicrm_tag_contact_for_review($contact);
-        $entityTags = civicrm_api3('EntityTag', 'get', array('entity_id' => 
$contact['id']));
-        $tag = reset($entityTags['values']);
-        $this->assertEquals(civicrm_api3('Tag', 'getvalue', array('name' => 
'Review', 'return' => 'id')), $tag['tag_id']);
-    }
-
-    /**
-     * Test wmf_ensure_language_exists
-     *
-     * Maintenance note: the civicrm entity_tag get api returns an odd syntax.
-     *
-     * If that ever gets fixed it may break this test - but only the test would
-     * need to be altered to adapt.
-     *
-     * @throws \CiviCRM_API3_Exception
-     */
-    public function testEnsureLanguageExists() {
-        civicrm_initialize();
-        wmf_civicrm_ensure_language_exists('en_IL');
-        $languages = civicrm_api3('OptionValue', 'get', array(
-            'option_group_name' => 'languages',
-            'name' => 'en_IL',
-        ));
-        $this->assertEquals(1, $languages['count']);
-    }
-
-    /**
-     * Test wmf custom api entity get detail.
-     *
-     * @todo consider moving test to thank_you module or helper function out 
of there.
-     *
-     * @throws \CiviCRM_API3_Exception
-     */
-    public function testGetEntityTagDetail() {
-        civicrm_initialize();
-        $contact = $this->callAPISuccess('Contact', 'create', array(
-            'first_name' => 'Papa',
-            'last_name' => 'Smurf',
-            'contact_type' => 'Individual',
-        ));
-        $contribution = $this->callAPISuccess('Contribution', 'create', array(
-            'contact_id' => $contact['id'],
-            'total_amount' => 40,
-            'financial_type_id' => 'Donation',
-        ));
-
-        $tag1 = $this->ensureTagExists('smurfy');
-        $tag2 = $this->ensureTagExists('smurfalicious');
-
-        $this->callAPISuccess('EntityTag', 'create', array('entity_id' => 
$contribution['id'], 'entity_table' => 'civicrm_contribution', 'tag_id' => 
'smurfy'));
-        $this->callAPISuccess('EntityTag', 'create', array('entity_id' => 
$contribution['id'], 'entity_table' => 'civicrm_contribution', 'tag_id' => 
'smurfalicious'));
-
-        $smurfiestTags = wmf_thank_you_get_tag_names($contribution['id']);
-        $this->assertEquals(array('smurfy', 'smurfalicious'), $smurfiestTags);
-
-        $this->callAPISuccess('Tag', 'delete', array('id' => $tag1));
-        $this->callAPISuccess('Tag', 'delete', array('id' => $tag2));
-    }
-
-    /**
-     * Helper function to protect test against cleanup issues.
-     *
-     * @param string $name
-     * @return int
-     */
-    public function ensureTagExists($name) {
-        $tags = $this->callAPISuccess('EntityTag', 'getoptions', array('field' 
=> 'tag_id'));
-        if (in_array($name, $tags['values'])) {
-            return array_search($name, $tags['values']);
-        }
-        $tag = $this->callAPISuccess('Tag', 'create', array(
-            'used_for' => 'civicrm_contribution',
-            'name' => $name
-        ));
-        $this->callAPISuccess('Tag', 'getfields', array('cache_clear' => 1));
-        return $tag['id'];
-    }
-
-}
->>>>>>> BRANCH (768b0e Pull composer changes from deployment)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3f03cc25c78be8a0c3efbb13ea8dba8d5ce5015
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen <emcnaugh...@wikimedia.org>
Gerrit-Reviewer: Eileen <emcnaugh...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to