Ejegg has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/373131 )
Change subject: Merge branch 'master' into deployment
......................................................................
Merge branch 'master' into deployment
9c67c29a2 Omnimail::omnigroupmember.get job: add slow download handling.
556ec49f5 CI: install CiviCRM with a fake sendmail
e66cf5f38 Update SmashPig library
Change-Id: Ie12fd395e24e6d6569aebee8d09d704e23935a8b
---
D sites/all/modules/wmf_audit/tests/IngenicoAuditTest.php
1 file changed, 0 insertions(+), 174 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm
refs/changes/31/373131/1
diff --git a/sites/all/modules/wmf_audit/tests/IngenicoAuditTest.php
b/sites/all/modules/wmf_audit/tests/IngenicoAuditTest.php
deleted file mode 100644
index 2516fcc..0000000
--- a/sites/all/modules/wmf_audit/tests/IngenicoAuditTest.php
+++ /dev/null
@@ -1,174 +0,0 @@
-<<<<<<< HEAD (4aa177 Merge branch 'master' into deployment)
-=======
-<?php
-
-/**
- * @group Ingenico
- * @group WmfAudit
- */
-class IngenicoAuditTest extends BaseWmfDrupalPhpUnitTestCase {
- static protected $messages;
-
- protected $contact_id;
- protected $contribution_ids = array();
-
- public function setUp() {
- parent::setUp();
- self::$messages = array();
-
- $dirs = array(
- 'wmf_audit_log_archive_dir' => __DIR__ . '/data/logs/',
- 'ingenico_audit_recon_completed_dir' =>
$this->getTempDir(),
- 'ingenico_audit_working_log_dir' => $this->getTempDir(),
- );
-
- foreach ( $dirs as $var => $dir ) {
- if ( !is_dir( $dir ) ) {
- mkdir( $dir );
- }
- variable_set( $var, $dir );
- }
-
- $old_working = glob( $dirs['ingenico_audit_working_log_dir'] .
'*' );
- foreach ( $old_working as $zap ) {
- if ( is_file( $zap ) ) {
- unlink( $zap );
- }
- }
-
- variable_set( 'ingenico_audit_log_search_past_days', 7 );
-
- // Fakedb doesn't fake the original txn for refunds, so add one
here
- $existing = wmf_civicrm_get_contributions_from_gateway_id(
'globalcollect', '11992288' );
- if ( $existing ) {
- // Previous test run may have crashed before cleaning up
- $contribution = $existing[0];
- } else {
- $msg = array(
- 'contribution_tracking_id' => 8675309,
- 'currency' => 'USD',
- 'date' => 1455825706,
- 'email' => '[email protected]',
- 'gateway' => 'globalcollect',
- 'gateway_txn_id' => '11992288',
- 'gross' => 100.00,
- 'payment_method' => 'cc',
- 'payment_submethod' => 'visa',
- );
- $contribution =
wmf_civicrm_contribution_message_import( $msg );
- }
- $this->contact_id = $contribution['contact_id'];
-
- // and another for the chargeback
- $existing = wmf_civicrm_get_contributions_from_gateway_id(
'globalcollect', '55500002' );
- if ( $existing ) {
- // Previous test run may have crashed before cleaning up
- $contribution = $existing[0];
- } else {
- $msg = array(
- 'contribution_tracking_id' => 5318008,
- 'currency' => 'USD',
- 'date' => 1443724034,
- 'email' => '[email protected]',
- 'gateway' => 'globalcollect',
- 'gateway_txn_id' => '55500002',
- 'gross' => 200.00,
- 'payment_method' => 'cc',
- 'payment_submethod' => 'visa',
- 'contact_id' => $this->contact_id,
- );
- $contribution =
wmf_civicrm_contribution_message_import( $msg );
- }
- }
-
- public function tearDown() {
- $this->cleanUpContact( $this->contact_id );
- }
-
- public function auditTestProvider() {
- return array(
- array( __DIR__ . '/data/Ingenico/donation/', array(
- 'main' => array(
- array(
- 'contribution_tracking_id' =>
'5551212',
- 'country' => 'US',
- 'currency' => 'USD',
- 'date' => 1501368968,
- 'email' =>
'[email protected]',
- 'first_name' => 'Arthur',
- 'gateway' => 'globalcollect',
// TODO: Connect donations get 'ingenico'
- 'gateway_txn_id' => '987654321',
- 'gross' => '3.00',
- 'installment' => 1,
- 'last_name' => 'Aardvark',
- 'order_id' => '987654321',
- 'payment_method' => 'cc',
- 'payment_submethod' => 'visa',
- 'user_ip' => '111.222.33.44',
- 'utm_campaign' =>
'ingenico_audit',
- 'utm_medium' =>
'ingenico_audit',
- 'utm_source' =>
'ingenico_audit',
- 'street_address' => '1111 Fake
St',
- 'city' => 'Denver',
- 'state_province' => 'CO',
- 'postal_code' => '87654',
- ),
- ),
- ) ),
- array( __DIR__ . '/data/Ingenico/refund/', array(
- 'negative' => array(
- array(
- 'date' => 1500942220,
- 'gateway' => 'globalcollect',
- 'gateway_parent_id' =>
'11992288',
- 'gateway_refund_id' =>
'11992288',
- 'gross' => '100.00',
- 'gross_currency' => 'USD',
- 'type' => 'refund',
- ),
- ),
- ) ),
- array( __DIR__ . '/data/Ingenico/chargeback/', array(
- 'negative' => array(
- array(
- 'date' => 1495023569,
- 'gateway' => 'globalcollect',
- 'gateway_parent_id' =>
'55500002',
- 'gateway_refund_id' =>
'55500002',
- 'gross' => '200.00',
- 'gross_currency' => 'USD',
- 'type' => 'chargeback',
- ),
- ),
- ) ),
- );
- }
-
- /**
- * @dataProvider auditTestProvider
- */
- public function testParseFiles( $path, $expectedMessages ) {
- variable_set( 'ingenico_audit_recon_files_dir', $path );
-
- $this->runAuditor();
-
- $this->assertEquals( $expectedMessages, self::$messages );
- }
-
- protected function runAuditor() {
- $options = array(
- 'fakedb' => true,
- 'quiet' => true,
- 'test' => true,
- 'test_callback' => array( 'IngenicoAuditTest',
'receiveMessages' ),
- #'verbose' => 'true', # Uncomment to debug.
- );
- $audit = new IngenicoAuditProcessor( $options );
- $audit->run();
- }
-
- static public function receiveMessages( $msg, $type ) {
- self::$messages[$type][] = $msg;
- }
-}
->>>>>>> BRANCH (e66cf5 Update SmashPig library)
--
To view, visit https://gerrit.wikimedia.org/r/373131
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie12fd395e24e6d6569aebee8d09d704e23935a8b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits