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

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


Merge branch 'master' into deployment

And update vendor

ee26441 Localisation updates from https://translatewiki.net.
1e1f15e Check contribution_id before rectifying orphans
974b3ab ProcessResponse no longer needs to be public
0dee6d3 Remove unused form functions
01f1158 Delete unused CyclicalArray
6b42f45 Remove unused base adapter code
184e6a7 Fold getRetryData into mustache error form
e43388c Localisation updates from https://translatewiki.net.
e1cd297 Update default queue backend
4e63748 Remove Stomp requirement, update Composer libraries

Change-Id: Id1af1a2695075dba47e719f9910eeffdf0338350
---
D tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
M vendor
2 files changed, 1 insertion(+), 209 deletions(-)

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



diff --git 
a/tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php 
b/tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
deleted file mode 100644
index f1ef314..0000000
--- a/tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
+++ /dev/null
@@ -1,208 +0,0 @@
-<<<<<<< HEAD   (e7abdb Merge branch 'master' into deployment)
-=======
-<?php
-
-/**
- * Wikimedia Foundation
- *
- * LICENSE
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-use Psr\Log\LogLevel;
-
-/**
- *
- * @group Fundraising
- * @group DonationInterface
- * @group GlobalCollect
- * @group OrphanSlayer
- */
-class DonationInterface_Adapter_GlobalCollect_Orphans_GlobalCollectTest 
extends DonationInterfaceTestCase {
-       public function setUp() {
-               parent::setUp();
-
-               $this->setMwGlobals( array(
-                       'wgGlobalCollectGatewayEnabled' => true,
-                       'wgDonationInterfaceAllowedHtmlForms' => array(
-                               'cc-vmad' => array(
-                                       'gateway' => 'globalcollect',
-                                       'payment_methods' => array('cc' => 
array( 'visa', 'mc', 'amex', 'discover' )),
-                                       'countries' => array(
-                                               '+' => array( 'US', ),
-                                       ),
-                               ),
-                       ),
-               ) );
-       }
-
-       /**
-        * @param $name string The name of the test case
-        * @param $data array Any parameters read from a dataProvider
-        * @param $dataName string|int The name or index of the data set
-        */
-       function __construct( $name = null, array $data = array(), $dataName = 
'' ) {
-               parent::__construct( $name, $data, $dataName );
-               $this->testAdapterClass = 'TestingGlobalCollectOrphanAdapter';
-               $this->dummy_utm_data = array (
-                       'utm_source' => 'dummy_source',
-                       'utm_campaign' => 'dummy_campaign',
-                       'utm_medium' => 'dummy_medium',
-                       'date' => time(),
-               );
-       }
-
-       public function testConstructor() {
-
-               $options = $this->getDonorTestData();
-               $class = $this->testAdapterClass;
-
-               $gateway = $this->getFreshGatewayObject();
-
-               $this->assertInstanceOf( $class, $gateway );
-
-               $this->verifyNoLogErrors();
-       }
-
-
-       public function testBatchOrderID_generate() {
-
-               //no data on construct, generate Order IDs
-               $gateway = $this->getFreshGatewayObject( null, array ( 
'order_id_meta' => array ( 'generate' => TRUE ) ) );
-               $this->assertTrue( $gateway->getOrderIDMeta( 'generate' ), 'The 
order_id meta generate setting override is not working properly. Order_id 
generation may be broken.' );
-               $this->assertNotNull( $gateway->getData_Unstaged_Escaped( 
'order_id' ), 'Failed asserting that an absent order id is not left as null, 
when generating our own' );
-
-               $data = array_merge( $this->getDonorTestData(), 
$this->dummy_utm_data );
-               $data['order_id'] = '55555';
-
-               //now, add data and check that we didn't kill the oid. Still 
generating.
-               $gateway->loadDataAndReInit( $data );
-               $this->assertEquals( $gateway->getData_Unstaged_Escaped( 
'order_id' ), '55555', 'loadDataAndReInit failed to stick OrderID' );
-
-               $data['order_id'] = '444444';
-               $gateway->loadDataAndReInit( $data );
-               $this->assertEquals( $gateway->getData_Unstaged_Escaped( 
'order_id' ), '444444', 'loadDataAndReInit failed to stick OrderID' );
-
-               $this->verifyNoLogErrors();
-       }
-
-       public function testBatchOrderID_no_generate() {
-
-               //no data on construct, do not generate Order IDs
-               $gateway = $this->getFreshGatewayObject( null, array ( 
'order_id_meta' => array ( 'generate' => FALSE ) ) );
-               $this->assertFalse( $gateway->getOrderIDMeta( 'generate' ), 
'The order_id meta generate setting override is not working properly. Deferred 
order_id generation may be broken.' );
-               $this->assertNull( $gateway->getData_Unstaged_Escaped( 
'order_id' ), 'Failed asserting that an absent order id is left as null, when 
not generating our own' );
-
-               $data = array_merge( $this->getDonorTestData(), 
$this->dummy_utm_data );
-               $data['order_id'] = '66666';
-
-               //now, add data and check that we didn't kill the oid. Still 
not generating
-               $gateway->loadDataAndReInit( $data );
-               $this->assertEquals( $gateway->getData_Unstaged_Escaped( 
'order_id' ), '66666', 'loadDataAndReInit failed to stick OrderID' );
-
-               $data['order_id'] = '777777';
-               $gateway->loadDataAndReInit( $data );
-               $this->assertEquals( $gateway->getData_Unstaged_Escaped( 
'order_id' ), '777777', 'loadDataAndReInit failed to stick OrderID on second 
batch item' );
-
-               $this->verifyNoLogErrors();
-       }
-
-       public function testGCFormLoad() {
-               $init = $this->getDonorTestData( 'US' );
-               unset( $init['order_id'] );
-               $init['payment_method'] = 'cc';
-               $init['payment_submethod'] = 'visa';
-               $init['ffname'] = 'cc-vmad';
-
-               $assertNodes = array (
-                       'submethod-mc' => array (
-                               'nodename' => 'input'
-                       ),
-                       'selected-amount' => array (
-                               'nodename' => 'span',
-                               'innerhtmlmatches' => '/^\s*' .
-                                       str_replace( '$', '\$',
-                                               Amount::format( 1.55, 'USD', 
$init['language'] . '_' . $init['country'] )
-                                       ).
-                                       '\s*$/',
-                       ),
-                       'state' => array (
-                               'nodename' => 'select',
-                               'selected' => 'CA',
-                       ),
-               );
-
-               $this->verifyFormOutput( 'GlobalCollectGateway', $init, 
$assertNodes, true );
-       }
-
-       /**
-        * Tests to make sure that certain error codes returned from GC will
-        * trigger order cancellation, even if retryable errors also exist.
-        * @dataProvider mcNoRetryCodeProvider
-        */
-       public function testNoMastercardFinesForRepeatOnBadCodes( $code ) {
-               $gateway = $this->getFreshGatewayObject( null, array ( 
'order_id_meta' => array ( 'generate' => FALSE ) ) );
-
-               //Toxic card should not retry, even if there's an order id 
collision
-               $init = array_merge( $this->getDonorTestData(), 
$this->dummy_utm_data );
-               $init['ffname'] = 'cc-vmad';
-               $init['order_id'] = '55555';
-               $init['email'] = 'innoc...@clean.com';
-               $init['contribution_tracking_id'] = mt_rand();
-               $gateway->loadDataAndReInit( $init );
-
-               $gateway->setDummyGatewayResponseCode( $code );
-               $result = $gateway->do_transaction( 'Confirm_CreditCard' );
-               $this->assertEquals( 1, count( $gateway->curled ), "Gateway 
kept trying even with response code $code!  MasterCard could fine us a thousand 
bucks for that!" );
-               $this->assertEquals( false, $result->getCommunicationStatus(), 
"Error code $code should mean status of do_transaction is false" );
-               $errors = $result->getErrors();
-               $this->assertFalse( empty( $errors ), 'Orphan adapter needs to 
see the errors to consider it rectified' );
-               $this->assertTrue( array_key_exists( '1000001', $errors ), 
'Orphan adapter needs error 1000001 to consider it rectified' );
-               $loglines = $this->getLogMatches( LogLevel::INFO, "/Got error 
code $code, not retrying to avoid MasterCard fines./" );
-               $this->assertNotEmpty( $loglines, "GC Error $code is not 
generating the expected payments log error" );
-       }
-
-       /**
-        * Make sure we're incorporating GET_ORDERSTATUS AVS and CVV responses 
into
-        * fraud scores.
-        */
-       function testGetOrderstatusPostProcessFraud() {
-               $this->setMwGlobals( array(
-                       'wgDonationInterfaceEnableCustomFilters' => true,
-                       'wgGlobalCollectGatewayCustomFiltersFunctions' => array(
-                               'getCVVResult' => 10,
-                               'getAVSResult' => 30,
-                       ),
-               ) );
-               $gateway = $this->getFreshGatewayObject( null, array ( 
'order_id_meta' => array ( 'generate' => FALSE ) ) );
-
-               $init = array_merge( $this->getDonorTestData(), 
$this->dummy_utm_data );
-               $init['ffname'] = 'cc-vmad';
-               $init['order_id'] = '55555';
-               $init['email'] = 'innoc...@manichean.com';
-               $init['contribution_tracking_id'] = mt_rand();
-               $init['payment_method'] = 'cc';
-
-               $gateway->loadDataAndReInit( $init );
-               $gateway->setDummyGatewayResponseCode( '600_badCvv' );
-
-               $gateway->do_transaction( 'Confirm_CreditCard' );
-               $action = $gateway->getValidationAction();
-               $this->assertEquals( 'review', $action,
-                       'Orphan gateway should fraud fail on bad CVV and AVS' );
-
-               $exposed = TestingAccessWrapper::newFromObject( $gateway );
-               $this->assertEquals( 40, $exposed->risk_score,
-                       'Risk score was incremented correctly.' );
-       }
-}
->>>>>>> BRANCH (4e6374 Remove Stomp requirement, update Composer libraries)
diff --git a/vendor b/vendor
index 78065ce..361bfc7 160000
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 78065ce486209a6c6ce1bbdc3263eef27564a26e
+Subproject commit 361bfc74bd56c38d6c3a58fb198511b38d6d5380

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1af1a2695075dba47e719f9910eeffdf0338350
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>
Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com>
Gerrit-Reviewer: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: Cdentinger <cdentin...@wikimedia.org>
Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org>
Gerrit-Reviewer: Ssmith <ssm...@wikimedia.org>
Gerrit-Reviewer: XenoRyet <dkozlow...@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