jenkins-bot has submitted this change and it was merged.

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


Merge master into deployment

016478026a7f578f7366bf9715212fa166004d86 Fix undefined variable in logging
34201da71f03d1f9c683f7ca9f849afe034915f4 Localisation updates from 
https://translatewiki.net.
3f53295a2e83f5114b0c0fb3c081d6137c612d30 Enable fail page without adapter 
instance
cac78e9c863c91ceaf35a854a91ada927f83578e Localisation updates from 
https://translatewiki.net.
30485f300c9251568357a313964790482c63e57f Stop spinning onunload
2281b6ad086167a35fa5f333769a09943570c259 Catch and log errors in adapter 
constructors
17d47548e6a757754d68e79786d030ae50506544 Tests for new ResultPages functions
2ff3f28f4c3deca11971a3bd2deb325fd40cf062 Finish encapsulating Ingenico staging 
logic
150b9c3ae4f381b0449323fbc83041a7521aedf2 Encapsulate PayPal staging logic
d66acc24a8b963f6289aef2b181e4809971da8d2 Localisation updates from 
https://translatewiki.net.
63eaa785d704edabb6e9f6c210f555e2da2cdb82 Fix AstroPay submethod unstaging
08cc5fd4d619446e6c7a367ace7336dec1254ccd Localisation updates from 
https://translatewiki.net.
a3f324c36e6203a5a6df89485122b45e381f858c Prefer canonical parameter names in 
form chooser
1beaf23a6017a72f2f61db9f33b5d7ace0c0548b Fix language setup for AstroPay test
f49aa992e64684e31bd953411a4d73a6a6dc9a6b Fix fiscal number error messages

Change-Id: Ib4fbe83bc4ba4d7f65ae78c3102e5f1198f67bec
---
D tests/Adapter/Astropay/AstropayTest.php
D tests/Adapter/GatewayAdapterTest.php
D tests/FormChooserTest.php
D tests/includes/TestingGatewayPage.php
D tests/includes/test_page/TestingAmazonGateway.php
D tests/includes/test_page/TestingGlobalCollectGateway.php
D tests/includes/test_page/TestingWorldpayGateway.php
7 files changed, 0 insertions(+), 1,222 deletions(-)

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



diff --git a/tests/Adapter/Astropay/AstropayTest.php 
b/tests/Adapter/Astropay/AstropayTest.php
deleted file mode 100644
index 6be3e21..0000000
--- a/tests/Adapter/Astropay/AstropayTest.php
+++ /dev/null
@@ -1,585 +0,0 @@
-<<<<<<< HEAD   (53f84f Merge 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 Astropay
- */
-class DonationInterface_Adapter_Astropay_AstropayTest extends 
DonationInterfaceTestCase {
-
-       /**
-        * @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 = 'TestingAstropayAdapter';
-       }
-
-       function setUp() {
-               parent::setUp();
-               $this->setMwGlobals( array(
-                       'wgAstropayGatewayEnabled' => true,
-               ) );
-       }
-
-       /**
-        * Ensure we're setting the right url for each transaction
-        * @covers AstropayAdapter::getCurlBaseOpts
-        */
-       function testCurlUrl() {
-               $init = $this->getDonorTestData( 'BR' );
-               $gateway = $this->getFreshGatewayObject( $init );
-               $gateway->setCurrentTransaction( 'NewInvoice' );
-
-               $result = $gateway->getCurlBaseOpts();
-
-               $this->assertEquals(
-                       
'https://sandbox.astropay.example.com/api_curl/streamline/NewInvoice',
-                       $result[CURLOPT_URL],
-                       'Not setting URL to transaction-specific value.'
-               );
-       }
-
-       /**
-        * Test the NewInvoice transaction is making a sane request and signing
-        * it correctly
-        */
-       function testNewInvoiceRequest() {
-               $init = $this->getDonorTestData( 'BR' );
-               $session['Donor']['order_id'] = '123456789';
-               $this->setUpRequest( $init, $session );
-               $this->setLanguage( $init['language'] );
-               $gateway = new TestingAstropayAdapter();
-
-               $gateway->do_transaction( 'NewInvoice' );
-               parse_str( $gateway->curled[0], $actual );
-
-               $expected = array(
-                       'x_login' => 'createlogin',
-                       'x_trans_key' => 'createpass',
-                       'x_invoice' => '123456789',
-                       'x_amount' => '100.00',
-                       'x_currency' => 'BRL',
-                       'x_bank' => 'TE',
-                       'x_country' => 'BR',
-                       'x_description' => wfMessage( 
'donate_interface-donation-description' )->inLanguage( $init['language'] 
)->text(),
-                       'x_iduser' => '[email protected]',
-                       'x_cpf' => '00003456789',
-                       'x_name' => 'Nome Apelido',
-                       'x_email' => '[email protected]',
-                       // 'x_address' => 'Rua Falso 123',
-                       // 'x_zip' => '01110-111',
-                       // 'x_city' => 'São Paulo',
-                       // 'x_state' => 'SP',
-                       'control' => 
'AC43664E0C4DF30607A26F271C8998BC4EE26511366E65AFB69B96E89BFD4359',
-                       'type' => 'json',
-               );
-               $this->assertEquals( $expected, $actual, 'NewInvoice is not 
including the right parameters' );
-       }
-
-       /**
-        * When Astropay sends back valid JSON with status "0", we should set 
txn
-        * status to true and errors should be empty.
-        */
-       function testStatusNoErrors() {
-               $init = $this->getDonorTestData( 'BR' );
-               $gateway = $this->getFreshGatewayObject( $init );
-
-               $gateway->do_transaction( 'NewInvoice' );
-
-               $this->assertEquals( true, $gateway->getTransactionStatus(),
-                       'Transaction status should be true for code "0"' );
-
-               $this->assertEmpty( $gateway->getTransactionErrors(),
-                       'Transaction errors should be empty for code "0"' );
-       }
-
-       /**
-        * If astropay sends back non-JSON, communication status should be false
-        */
-       function testGibberishResponse() {
-               $init = $this->getDonorTestData( 'BR' );
-               $this->setLanguage( $init['language'] );
-               $gateway = $this->getFreshGatewayObject( $init );
-               $gateway->setDummyGatewayResponseCode( 'notJson' );
-
-               $gateway->do_transaction( 'NewInvoice' );
-
-               $this->assertEquals( false, $gateway->getTransactionStatus(),
-                       'Transaction status should be false for bad format' );
-       }
-
-       /**
-        * When Astropay sends back valid JSON with status "1", we should set
-        * error array to generic error and log a warning.
-        */
-       function testStatusErrors() {
-               $init = $this->getDonorTestData( 'BR' );
-               $this->setLanguage( $init['language'] );
-               $gateway = $this->getFreshGatewayObject( $init );
-               $gateway->setDummyGatewayResponseCode( '1' );
-
-               $gateway->do_transaction( 'NewInvoice' );
-
-               $expected = array(
-                       'internal-0000' => wfMessage( 
'donate_interface-processing-error')->inLanguage( $init['language'] )->text()
-               );
-               $this->assertEquals( $expected, 
$gateway->getTransactionErrors(),
-                       'Wrong error for code "1"' );
-               $logged = $this->getLogMatches( LogLevel::WARNING, '/This error 
message should appear in the log./' );
-               $this->assertNotEmpty( $logged );
-       }
-
-       /**
-        * do_transaction should set redirect key when we get a valid response.
-        */
-       function testRedirectOnSuccess() {
-               $init = $this->getDonorTestData( 'BR' );
-               $gateway = $this->getFreshGatewayObject( $init );
-
-               $gateway->do_transaction( 'NewInvoice' );
-
-               // from the test response
-               $expected = 
'https://sandbox.astropaycard.com/go_to_bank?id=A5jvKfK1iHIRUTPXXt8lDFGaRRLzPgBg';
-               $response = $gateway->getTransactionResponse();
-               $this->assertEquals( $expected, $response->getRedirect(),
-                       'do_transaction is not setting the right redirect' );
-       }
-
-       /**
-        * do_transaction should set redirect key when we get a valid response.
-        */
-       function testDoPaymentSuccess() {
-               $init = $this->getDonorTestData( 'BR' );
-               $init['payment_method'] = 'cc';
-               $gateway = $this->getFreshGatewayObject( $init );
-
-               $result = $gateway->doPayment();
-
-               // from the test response
-               $expected = 
'https://sandbox.astropaycard.com/go_to_bank?id=A5jvKfK1iHIRUTPXXt8lDFGaRRLzPgBg';
-               $this->assertEquals( $expected, $result->getRedirect(),
-                       'doPayment is not setting the right redirect' );
-       }
-
-       /**
-        * When Astropay sends back valid JSON with status "1", we should set
-        * error array to generic error and log a warning.
-        */
-       function testDoPaymentErrors() {
-               $init = $this->getDonorTestData( 'BR' );
-               $this->setLanguage( $init['language'] );
-               $gateway = $this->getFreshGatewayObject( $init );
-               $gateway->setDummyGatewayResponseCode( '1' );
-
-               $result = $gateway->doPayment();
-
-               $expectedMessage = wfMessage( 
'donate_interface-processing-error')->inLanguage( $init['language'] )->text();
-               $actual = $result->getErrors();
-               $this->assertEquals( $expectedMessage, 
$actual['internal-0000']['message'],
-                       'Wrong error array in PaymentResult' );
-
-               $logged = $this->getLogMatches( LogLevel::WARNING, '/This error 
message should appear in the log./' );
-               $this->assertNotEmpty( $logged );
-               // TODO: Should this really be a refresh, or should we finalize 
to failed here?
-               $this->assertTrue( $result->getRefresh(), 'PaymentResult should 
be a refresh' );
-       }
-
-       /**
-        * Should set a validation error on amount
-        */
-       function testDoPaymentLimitExceeded() {
-               $init = $this->getDonorTestData( 'BR' );
-               $this->setLanguage( $init['language'] );
-               $init['payment_method'] = 'cc';
-               $gateway = $this->getFreshGatewayObject( $init );
-               $gateway->setDummyGatewayResponseCode( 'limit_exceeded' );
-
-               $result = $gateway->doPayment();
-               $this->assertTrue( $result->getRefresh(), 'PaymentResult should 
be a refresh' );
-
-               $errors = $gateway->getTransactionResponse()->getErrors();
-               $expectedMessage = wfMessage( 
'donate_interface-error-msg-limit')->inLanguage( $init['language'] )->text();
-               $this->assertEquals( $expectedMessage, 
$errors['internal-0000']['message'] );
-               $this->assertEquals( 'amount', 
$errors['internal-0000']['context'] );
-       }
-
-       /**
-        * Should set a validation error on fiscal_number
-        */
-       function testDoPaymentBadFiscalNumber() {
-               $init = $this->getDonorTestData( 'BR' );
-               $this->setLanguage( $init['language'] );
-               $init['payment_method'] = 'cc';
-               $gateway = $this->getFreshGatewayObject( $init );
-               $gateway->setDummyGatewayResponseCode( 'fiscal_number' );
-
-               $result = $gateway->doPayment();
-               $this->assertTrue( $result->getRefresh(), 'PaymentResult should 
be a refresh' );
-
-               $errors = $gateway->getTransactionResponse()->getErrors();
-               $expectedMessage = DataValidator::getErrorMessage( 
'fiscal_number', 'calculated', $init['language'], $init['country'] );
-               $this->assertEquals( $expectedMessage, 
$errors['internal-0000']['message'] );
-               $this->assertEquals( 'fiscal_number', 
$errors['internal-0000']['context'] );
-       }
-
-       /**
-        * Should finalize to failed
-        */
-       function testDoPaymentUserUnauthorized() {
-               $init = $this->getDonorTestData( 'BR' );
-               $this->setLanguage( $init['language'] );
-               $init['payment_method'] = 'cc';
-               $gateway = $this->getFreshGatewayObject( $init );
-               $gateway->setDummyGatewayResponseCode( 'user_unauthorized' );
-
-               $result = $gateway->doPayment();
-               $this->assertTrue( $result->isFailed() );
-       }
-
-       /**
-        * Should tell the user to try again
-        */
-       function testDoPaymentCouldNotRegister() {
-               $init = $this->getDonorTestData( 'BR' );
-               $this->setLanguage( $init['language'] );
-               $init['payment_method'] = 'cc';
-               $gateway = $this->getFreshGatewayObject( $init );
-               $gateway->setDummyGatewayResponseCode( 'could_not_register' );
-
-               $result = $gateway->doPayment();
-               $this->assertTrue( $result->getRefresh(), 'PaymentResult should 
be a refresh' );
-
-               $errors = $gateway->getTransactionResponse()->getErrors();
-               $expectedMessage = wfMessage( 
'donate_interface-try-again')->inLanguage( $init['language'] )->text();
-               $this->assertEquals( $expectedMessage, 
$errors['internal-0000']['message'] );
-       }
-
-       /**
-        * Should tell the user to try again
-        */
-       function testDoPaymentCouldNotMakeDeposit() {
-               $init = $this->getDonorTestData( 'BR' );
-               $this->setLanguage( $init['language'] );
-               $init['payment_method'] = 'cc';
-               $gateway = $this->getFreshGatewayObject( $init );
-               $gateway->setDummyGatewayResponseCode( 'could_not_make_deposit' 
);
-
-               $result = $gateway->doPayment();
-               $this->assertTrue( $result->getRefresh(), 'PaymentResult should 
be a refresh' );
-
-               $errors = $gateway->getTransactionResponse()->getErrors();
-               $expectedMessage = wfMessage( 
'donate_interface-try-again')->inLanguage( $init['language'] )->text();
-               $this->assertEquals( $expectedMessage, 
$errors['internal-0000']['message'] );
-       }
-
-       /**
-        * PaymentStatus transaction should interpret the delimited response
-        */
-       function testPaymentStatus() {
-               $init = $this->getDonorTestData( 'BR' );
-               $session['Donor']['order_id'] = '123456789';
-               $this->setUpRequest( $init, $session );
-               $gateway = new TestingAstropayAdapter();
-
-               $gateway->do_transaction( 'PaymentStatus' );
-
-               // from the test response
-               $expected = array(
-                       'result' => '9',
-                       'x_amount' => '100.00',
-                       'x_iduser' => '08feb2d12771bbcfeb86',
-                       'x_invoice' => '123456789',
-                       'PT' => '1',
-                       'x_control' => 
'0656B92DF44B814D48D84FED2F444CCA1E991A24A365FBEECCCA15B73CC08C2A',
-                       'x_document' => '987654321',
-                       'x_bank' => 'TE',
-                       'x_payment_type' => '03',
-                       'x_bank_name' => 'GNB',
-                       'x_currency' => 'BRL',
-               );
-               $results = $gateway->getTransactionData();
-               $this->assertEquals( $expected, $results,
-                       'PaymentStatus response not interpreted correctly' );
-               // Should not throw exception
-               $gateway->verifyStatusSignature( $results );
-       }
-
-       /**
-        * Invalid signature should be recognized as such.
-        */
-       function testInvalidSignature() {
-               $init = $this->getDonorTestData( 'BR' );
-               $session['Donor']['order_id'] = '123456789';
-               $this->setUpRequest( $init, $session );
-               $gateway = new TestingAstropayAdapter();
-
-               $gateway->setDummyGatewayResponseCode( 'badsig' );
-               $gateway->do_transaction( 'PaymentStatus' );
-
-               $results = $gateway->getTransactionData();
-               $this->setExpectedException( 'ResponseProcessingException' );
-               $gateway->verifyStatusSignature( $results );
-       }
-
-       /**
-        * If status is paid and signature is correct, processResponse should 
not
-        * throw exception and final status should be 'completed'
-        */
-       function testSuccessfulReturn() {
-               $init = $this->getDonorTestData( 'BR' );
-               $session['Donor']['order_id'] = '123456789';
-               $this->setUpRequest( $init, $session );
-               $gateway = new TestingAstropayAdapter();
-
-               // Next lines mimic Astropay resultswitcher
-               $gateway->setCurrentTransaction( 'ProcessReturn' );
-               $response = array(
-                       'result' => '9',
-                       'x_amount' => '100.00',
-                       'x_amount_usd' => '42.05',
-                       'x_control' => 
'DDF89085AC70C0B0628150C51D64419D8592769F2439E3936570E26D24881730',
-                       'x_description' => 'Donation to the Wikimedia 
Foundation',
-                       'x_document' => '32869',
-                       'x_iduser' => '08feb2d12771bbcfeb86',
-                       'x_invoice' => '123456789',
-               );
-
-               $gateway->processResponse( $response );
-               $status = $gateway->getFinalStatus();
-               $this->assertEquals( FinalStatus::COMPLETE, $status );
-       }
-
-       /**
-        * Make sure we record the actual amount charged, even if the donor has
-        * opened a new window and screwed up their session data.
-        */
-       function testReturnUpdatesAmount() {
-               $init = $this->getDonorTestData( 'BR' );
-               $init['amount'] = '22.55'; // junk session data from another 
banner click
-               $session['Donor']['order_id'] = '123456789';
-               $this->setUpRequest( $init, $session );
-               $gateway = new TestingAstropayAdapter();
-
-               $amount = $gateway->getData_Unstaged_Escaped( 'amount' );
-               $this->assertEquals( '22.55', $amount );
-
-               // Next lines mimic Astropay resultswitcher
-               $gateway->setCurrentTransaction( 'ProcessReturn' );
-               $response = array(
-                       'result' => '9',
-                       'x_amount' => '100.00',
-                       'x_amount_usd' => '42.05',
-                       'x_control' => 
'DDF89085AC70C0B0628150C51D64419D8592769F2439E3936570E26D24881730',
-                       'x_description' => 'Donation to the Wikimedia 
Foundation',
-                       'x_document' => '32869',
-                       'x_iduser' => '08feb2d12771bbcfeb86',
-                       'x_invoice' => '123456789',
-               );
-
-               $gateway->processResponse( $response );
-               $amount = $gateway->getData_Unstaged_Escaped( 'amount' );
-               $this->assertEquals( '100.00', $amount, 'Not recording correct 
amount' );
-       }
-
-       /**
-        * If payment is rejected, final status should be 'failed'
-        */
-       function testRejectedReturn() {
-               $init = $this->getDonorTestData( 'BR' );
-               $session['Donor']['order_id'] = '123456789';
-               $this->setUpRequest( $init, $session );
-               $gateway = new TestingAstropayAdapter();
-
-               $gateway->setCurrentTransaction( 'ProcessReturn' );
-               $response = array(
-                       'result' => '8', // rejected by bank
-                       'x_amount' => '100.00',
-                       'x_amount_usd' => '42.05',
-                       'x_control' => 
'706F57BC3E74906B14B1DEB946F027104513797CC62AC0F5107BC98F42D5DC95',
-                       'x_description' => 'Donation to the Wikimedia 
Foundation',
-                       'x_document' => '32869',
-                       'x_iduser' => '08feb2d12771bbcfeb86',
-                       'x_invoice' => '123456789',
-               );
-
-               $gateway->processResponse( $response );
-               $status = $gateway->getFinalStatus();
-               $this->assertEquals( FinalStatus::FAILED, $status );
-       }
-
-       function testStageBankCode() {
-               $init = $this->getDonorTestData( 'BR' );
-               $init['payment_method'] = 'cc';
-               $init['payment_submethod'] = 'elo';
-               $gateway = $this->getFreshGatewayObject( $init );
-
-               $gateway->doPayment();
-
-               $exposed = TestingAccessWrapper::newFromObject( $gateway );
-               $bank_code = $exposed->getData_Staged( 'bank_code' );
-               $this->assertEquals( 'EL', $bank_code, 'Not setting bank_code 
in doPayment' );
-       }
-
-       /**
-        * Test that we run the AntiFraud hooks before redirecting
-        */
-       function testAntiFraudHooks() {
-               DonationInterface_FraudFiltersTest::setupFraudMaps();
-               $init = $this->getDonorTestData( 'BR' );
-               $init['payment_method'] = 'cc';
-               $init['bank_code'] = 'VD';
-               // following data should trip fraud alarms
-               $init['utm_medium'] = 'somethingmedia';
-               $init['utm_source'] = 'somethingmedia';
-               $init['email'] = '[email protected]';
-
-               $gateway = $this->getFreshGatewayObject( $init );
-
-               $result = $gateway->doPayment();
-
-               $this->assertTrue( $result->isFailed(), 'Result should be 
failure if fraud filters say challenge' );
-               $this->assertEquals( 'challenge', 
$gateway->getValidationAction(), 'Validation action is not as expected' );
-               $exposed = TestingAccessWrapper::newFromObject( $gateway );
-               $this->assertEquals( 60, $exposed->risk_score, 'RiskScore is 
not as expected' );
-       }
-
-       /**
-        * Before redirecting a user to the processor, we should log all of 
their
-        * details at info level
-        */
-       function testLogDetails() {
-               $init = $this->getDonorTestData( 'BR' );
-               $init['payment_method'] = 'cc';
-               $session['Donor']['order_id'] = '123456789';
-               $this->setUpRequest( $init, $session );
-               $gateway = new TestingAstropayAdapter();
-
-               $gateway->doPayment();
-               $logged = $this->getLogMatches( LogLevel::INFO, '/^Redirecting 
for transaction: /' );
-               $this->assertEquals( 1, count( $logged ), 'Should have logged 
details once' );
-               preg_match( '/Redirecting for transaction: (.*)$/', $logged[0], 
$matches );
-               $detailString = $matches[1];
-               $expected = array(
-                       'referrer' => 'www.yourmom.com',
-                       'currency_code' => 'BRL',
-                       'payment_submethod' => 'test_bank',
-                       'fname' => 'Nome',
-                       'lname' => 'Apelido',
-                       'amount' => '100.00',
-                       'language' => 'pt',
-                       'email' => '[email protected]',
-                       'country' => 'BR',
-                       'payment_method' => 'cc',
-                       'user_ip' => '127.0.0.1',
-                       'recurring' => '',
-                       'utm_source' => '..cc',
-                       'gateway' => 'astropay',
-                       'gateway_account' => 'test',
-                       'gateway_txn_id' => false,
-                       'response' => false,
-                       'correlation-id' => 'astropay-123456789',
-                       'php-message-class' => 
'SmashPig\CrmLink\Messages\DonationInterfaceMessage',
-               );
-               $actual = json_decode( $detailString, true );
-               // TODO: when tests use PHPUnit 4.4
-               // $this->assertArraySubset( $expected, $actual, false, 'Logged 
the wrong stuff' );
-               unset( $actual['contribution_tracking_id'] );
-               unset( $actual['date'] );
-               $this->assertEquals( $expected, $actual, 'Logged the wrong 
stuff!' );
-       }
-
-       function testStageFiscalNumber() {
-               $init = $this->getDonorTestData( 'BR' );
-               $init['fiscal_number'] = '000.034.567-89';
-               $gateway = $this->getFreshGatewayObject( $init );
-
-               $gateway->doPayment();
-
-               $exposed = TestingAccessWrapper::newFromObject( $gateway );
-               $staged = $exposed->getData_Staged( 'fiscal_number' );
-               $this->assertEquals( '00003456789', $staged, 'Not stripping 
fiscal_number punctuation in doPayment' );
-       }
-
-       /**
-        * We should increment the order ID with each NewInvoice call
-        */
-       function testNewInvoiceOrderId() {
-               $init = $this->getDonorTestData( 'BR' );
-               $firstRequest = $this->setUpRequest( $init );
-               $firstAttempt = new TestingAstropayAdapter();
-               $firstAttempt->setDummyGatewayResponseCode( '1' );
- 
-               $firstAttempt->doPayment();
-
-               $this->setUpRequest( $init, $firstRequest->getSessionArray() );
-               $secondAttempt = new TestingAstropayAdapter();
-               $secondAttempt->doPayment();
-
-               parse_str( $firstAttempt->curled[0], $firstParams );
-               parse_str( $secondAttempt->curled[0], $secondParams );
-
-               $this->assertNotEquals( $firstParams['x_invoice'], 
$secondParams['x_invoice'],
-                       'Not generating new order id for NewInvoice call'
-               );
-       }
-
-       /**
-        * We should increment the order ID with each NewInvoice call, even when
-        * retrying inside a single doPayment call
-        */
-       function testNewInvoiceOrderIdRetry() {
-               $init = $this->getDonorTestData( 'BR' );
-               $gateway = $this->getFreshGatewayObject( $init );
-               $gateway->setDummyGatewayResponseCode( 'collision' );
- 
-               $gateway->doPayment();
-
-               parse_str( $gateway->curled[0], $firstParams );
-               parse_str( $gateway->curled[1], $secondParams );
-
-               $this->assertNotEquals( $firstParams['x_invoice'], 
$secondParams['x_invoice'],
-                       'Not generating new order id for retried NewInvoice 
call'
-               );
-       }
-
-       /**
-        * We should show an error for incompatible country / currency 
combinations
-        */
-       function testBadCurrencyForCountry() {
-               $init = $this->getDonorTestData( 'BR' );
-               $init['currency_code'] = 'CLP';
-               $gateway = $this->getFreshGatewayObject( $init );
-
-               $errors = $gateway->getValidationErrors();
-
-               $this->assertNotEmpty( $errors );
-               $this->assertTrue(
-                       isset( $errors['currency_code'] ),
-                       'Should show a currency code error for trying to use 
CLP in BR'
-               );
-       }
-}
->>>>>>> BRANCH (f49aa9 Fix fiscal number error messages)
diff --git a/tests/Adapter/GatewayAdapterTest.php 
b/tests/Adapter/GatewayAdapterTest.php
deleted file mode 100644
index 08a0eed..0000000
--- a/tests/Adapter/GatewayAdapterTest.php
+++ /dev/null
@@ -1,331 +0,0 @@
-<<<<<<< HEAD   (53f84f Merge 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.
- *
- */
-
-/**
- * TODO: Test everything.
- * Make sure all the basic functions in the gateway_adapter are tested here.
- * Also, the extras and their hooks firing properly and... that the fail score
- * they give back is acted upon in the way we think it does.
- * Hint: For that mess, use GatewayAdapter's $debugarray
- *
- * Also, note that it barely makes sense to test the functions that need to be
- * defined in each gateway as per the abstract class. If we did that here, we'd
- * basically be just testing the test code. So, don't do it.
- * Those should definitely be tested in the various gateway-specific test
- * classes.
- *
- * @group Fundraising
- * @group DonationInterface
- * @group Splunge
- */
-class DonationInterface_Adapter_GatewayAdapterTest extends 
DonationInterfaceTestCase {
-
-       /**
-        * @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
-        */
-       public function __construct( $name = null, array $data = array(), 
$dataName = '' ) {
-               global $wgDonationInterfaceAllowedHtmlForms;
-               global $wgDonationInterfaceTest;
-               $wgDonationInterfaceTest = true;
-               parent::__construct( $name, $data, $dataName );
-       }
-
-       public function setUp() {
-               parent::setUp();
-
-               $this->setMwGlobals( array(
-                       'wgDonationInterfaceAllowedHtmlForms' => array(
-                               'testytest' => array(
-                                       'gateway' => 'globalcollect', // RAR.
-                               ),
-                               'rapidFailError' => array(
-                                       'file' => 'error-cc.html',
-                                       'gateway' => array( 'globalcollect', 
'adyen', 'amazon', 'astropay', 'paypal', 'worldpay' ),
-                                       'special_type' => 'error',
-                               )
-                       ),
-               ) );
-       }
-
-       /**
-        *
-        * @covers GatewayAdapter::__construct
-        * @covers GatewayAdapter::defineVarMap
-        * @covers GatewayAdapter::defineReturnValueMap
-        * @covers GatewayAdapter::defineTransactions
-        */
-       public function testConstructor() {
-
-               $options = $this->getDonorTestData();
-               $class = $this->testAdapterClass;
-
-               $_SERVER['REQUEST_URI'] = 
GatewayFormChooser::buildPaymentsFormURL(
-                       'testytest', array( 'gateway' => 
$class::getIdentifier() )
-               );
-               $gateway = $this->getFreshGatewayObject( $options );
-
-               $this->assertInstanceOf( TESTS_ADAPTER_DEFAULT, $gateway );
-
-               $this->resetAllEnv();
-               $gateway = $this->getFreshGatewayObject( $options = array() );
-               $this->assertInstanceOf( TESTS_ADAPTER_DEFAULT, $gateway, 
"Having trouble constructing a blank adapter." );
-       }
-
-       /**
-        *
-        * @covers GatewayAdapter::__construct
-        * @covers DonationData::__construct
-        */
-       public function testConstructorHasDonationData() {
-
-               $_SERVER['REQUEST_URI'] = 
'/index.php/Special:GlobalCollectGateway?form_name=TwoStepAmount';
-
-               $options = $this->getDonorTestData();
-               $gateway = $this->getFreshGatewayObject( $options );
-
-               $this->assertInstanceOf( 'TestingGlobalCollectAdapter', 
$gateway );
-
-               // please define this function only inside the 
TESTS_ADAPTER_DEFAULT,
-               // which should be a test adapter object that descende from one 
of the
-               // production adapters.
-               $exposed = TestingAccessWrapper::newFromObject( $gateway );
-               $this->assertInstanceOf( 'DonationData', $exposed->dataObj );
-       }
-
-       public function testLanguageChange() {
-               $options = $this->getDonorTestData( 'US' );
-               $options['payment_method'] = 'cc';
-               $options['payment_submethod'] = 'visa';
-               $gateway = $this->getFreshGatewayObject( $options );
-
-               $exposed = TestingAccessWrapper::newFromObject( $gateway );
-               $this->assertEquals( $exposed->getData_Staged( 'language' ), 
'en', "'US' donor's language was inproperly set. Should be 'en'" );
-               $gateway->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
-               // so we know it tried to screw with the session and such.
-
-               $options = $this->getDonorTestData( 'NO' );
-               $gateway = $this->getFreshGatewayObject( $options );
-               $exposed = TestingAccessWrapper::newFromObject( $gateway );
-               $this->assertEquals( $exposed->getData_Staged( 'language' ), 
'no', "'NO' donor's language was inproperly set. Should be 'no'" );
-       }
-
-       /**
-        * Make sure data is cleared out when changing gateways.
-        * In particular, ensure order IDs aren't leaking.
-        */
-       public function testResetOnGatewaySwitch() {
-               // Fill the session with some GlobalCollect stuff
-               $init = $this->getDonorTestData( 'FR' );
-               $init['contribution_tracking_id'] = mt_rand();
-               $firstRequest = $this->setUpRequest( $init );
-               $globalcollect_gateway = new TestingGlobalCollectAdapter();
-               $globalcollect_gateway->do_transaction( 'Donate' );
-
-               $session = $firstRequest->getSessionArray();
-               $this->assertEquals( 'globalcollect', 
$session['Donor']['gateway'], 'Test setup failed.' );
-
-               //Then simpulate switching to Worldpay
-               $session['sequence'] = 2;
-               unset( $init['order_id'] );
-
-               $secondRequest = $this->setUpRequest( $init, $session );
-               $worldpay_gateway = new TestingWorldpayAdapter();
-               $worldpay_gateway->batch_mode = true;
-
-               $session = $secondRequest->getSessionArray();
-               $expected_order_id = 
"{$init['contribution_tracking_id']}.{$session['sequence']}";
-               $this->assertEquals( $expected_order_id, 
$worldpay_gateway->getData_Unstaged_Escaped( 'order_id' ),
-                       'Order ID was not regenerated on gateway switch!' );
-       }
-
-       public function testResetOnRecurringSwitch() {
-               // Donor initiates a non-recurring donation
-               $init = $this->getDonorTestData();
-               $init['payment_method'] = 'cc';
-
-               $firstRequest = $this->setUpRequest( $init );
-
-               $gateway = new TestingGlobalCollectAdapter();
-               $gateway->do_transaction( 'Donate' );
-
-               $donorData = $firstRequest->getSessionData( 'Donor' );
-               $this->assertEquals( '', $donorData['recurring'], 'Test setup 
failed.' );
-               $oneTimeOrderId = $gateway->getData_Unstaged_Escaped( 
'order_id' );
-
-               // Then they go back and decide they want to make a recurring 
donation
-
-               $init['recurring'] = '1';
-               $secondRequest = $this->setUpRequest( $init, 
$firstRequest->getSessionArray() );
-
-               $gateway = new TestingGlobalCollectAdapter();
-               $gateway->do_transaction( 'Donate' );
-               $donorData = $secondRequest->getSessionData( 'Donor' );
-               $this->assertEquals( '1', $donorData['recurring'], 'Test setup 
failed.' );
-
-               $recurOrderId = $gateway->getData_Unstaged_Escaped( 'order_id' 
);
-
-               $this->assertNotEquals( $oneTimeOrderId, $recurOrderId,
-                       'Order ID was not regenerated on recurring switch!' );
-       }
-
-       public function testResetSubmethodOnMethodSwitch() {
-               // Donor thinks they want to make a bank transfer, submits form
-               $init = $this->getDonorTestData( 'BR' );
-               $init['payment_method'] = 'bt';
-               $init['payment_submethod'] = 'itau';
-
-               $firstRequest = $this->setUpRequest( $init );
-
-               $gateway = new TestingAstropayAdapter();
-               $gateway->do_transaction( 'Donate' );
-
-               $donorData = $firstRequest->getSessionData( 'Donor' );
-               $this->assertEquals( 'itau', $donorData['payment_submethod'], 
'Test setup failed.' );
-
-               // Then they go back and decide they want to donate via credit 
card
-               $init['payment_method'] = 'cc';
-               unset( $init['payment_submethod'] );
-
-               $secondRequest = $this->setUpRequest( $init, 
$firstRequest->getSessionArray() );
-
-               $gateway = new TestingAstropayAdapter();
-               $newMethod = $gateway->getData_Unstaged_Escaped( 
'payment_method' );
-               $newSubmethod = $gateway->getData_Unstaged_Escaped( 
'payment_submethod' );
-
-               $this->assertEquals( 'cc', $newMethod, 'Test setup failed' );
-               $this->assertEquals( '', $newSubmethod, 'Submethod was not 
blanked on method switch' );
-       }
-
-       public function testStreetStaging() {
-               $options = $this->getDonorTestData( 'BR' );
-               unset( $options['street'] );
-               $options['payment_method'] = 'cc';
-               $options['payment_submethod'] = 'visa';
-               $this->setUpRequest( $options );
-               $gateway = new TestingGlobalCollectAdapter();
-
-               $exposed = TestingAccessWrapper::newFromObject( $gateway );
-               $exposed->stageData();
-
-               $this->assertEquals( 'N0NE PROVIDED', $exposed->getData_Staged( 
'street' ),
-                       'Street must be stuffed with fake data to prevent AVS 
scam.' );
-       }
-
-       public function testZipStaging() {
-               $options = $this->getDonorTestData( 'BR' );
-               unset( $options['zip'] );
-               $options['payment_method'] = 'cc';
-               $options['payment_submethod'] = 'visa';
-               $this->setUpRequest( $options );
-               $gateway = new TestingGlobalCollectAdapter();
-
-               $exposed = TestingAccessWrapper::newFromObject( $gateway );
-               $exposed->stageData();
-
-               $this->assertEquals( '0', $exposed->getData_Staged( 'zip' ),
-                       'Postal code must be stuffed with fake data to prevent 
AVS scam.' );
-       }
-
-       public function testGetRapidFailPage() {
-               $this->setMwGlobals( array(
-                       'wgDonationInterfaceRapidFail' => true,
-               ) );
-               $options = $this->getDonorTestData( 'US' );
-               $options['payment_method'] = 'cc';
-               $gateway = $this->getFreshGatewayObject( $options );
-               $pageUrlParts = explode( '?', ResultPages::getFailPage( 
$gateway ) );
-               parse_str( $pageUrlParts[1], $params );
-               $this->assertEquals( 'rapidFailError', $params['ffname'] );
-               $this->assertEquals( 'cc', $params['payment_method'] );
-               $this->assertEquals( 'en', $params['language'] );
-       }
-
-       public function testGetFallbackFailPage() {
-               $this->setMwGlobals( array(
-                       'wgDonationInterfaceRapidFail' => false,
-                       'wgDonationInterfaceFailPage' => 'Main_Page', //coz we 
know it exists
-               ) );
-               $options = $this->getDonorTestData( 'US' );
-               $gateway = $this->getFreshGatewayObject( $options );
-               $page = ResultPages::getFailPage( $gateway );
-               $expectedTitle = Title::newFromText( 'Main_Page' );
-               $expectedURL = wfAppendQuery( $expectedTitle->getFullURL(), 
'uselang=en' );
-               $this->assertEquals( $expectedURL, $page );
-       }
-
-       // TODO: Move to ResultsPagesTest.php
-       public function testGetFailPageForType() {
-               $url = ResultPages::getFailPageForType( 'GlobalCollectAdapter' 
);
-               $expectedTitle = Title::newFromText( 'Donate-error' );
-               $expectedURL = wfAppendQuery( $expectedTitle->getFullURL(), 
'uselang=en' );
-               $this->assertEquals( $expectedURL, $url );
-       }
-
-       public function testCancelPage() {
-               $this->setMwGlobals( array(
-                       'wgDonationInterfaceCancelPage' => 'Ways to give'
-               ) );
-               $gateway = $this->getFreshGatewayObject();
-               $url = ResultPages::getCancelPage( $gateway );
-               $expectedTitle = Title::newFromText( 'Ways to give/en' );
-               $this->assertEquals( $expectedTitle->getFullURL(), $url );
-       }
-
-       public function testCannotOverrideIp() {
-               $data = $this->getDonorTestData( 'FR' );
-               unset( $data['country'] );
-               $data['user_ip'] = '8.8.8.8';
-
-               $gateway = $this->getFreshGatewayObject( $data );
-               $this->assertEquals( '127.0.0.1', 
$gateway->getData_Unstaged_Escaped( 'user_ip' ) );
-       }
-
-       public function testCanOverrideIpInBatchMode() {
-               $data = $this->getDonorTestData( 'FR' );
-               unset( $data['country'] );
-               $data['user_ip'] = '8.8.8.8';
-
-               $gateway = $this->getFreshGatewayObject( $data, array( 
'batch_mode' => true ) );
-               $this->assertEquals( '8.8.8.8', 
$gateway->getData_Unstaged_Escaped( 'user_ip' ) );
-       }
-
-       function testGetScoreName() {
-               $rule = array(
-                       'KeyMapA' => array( 'a','s','d','f','q','w','e','r','t' 
),
-                       'KeyMapB' => array(),
-                       'GibberishWeight' => .9,
-                       'Score' => 10
-               );
-               $this->setMwGlobals(
-                       array( 'wgDonationInterfaceNameFilterRules' => array( 
$rule ) )
-               );
-               $init = $this->getDonorTestData();
-               $init['fname'] = 'asdf';
-               $init['lname'] = 'qwert';
-
-               $gateway = $this->getFreshGatewayObject( $init );
-               $result = $gateway->getScoreName();
-               $this->assertNotEquals( 0, $result, 'Bad name not detected');
-       }
-}
-
->>>>>>> BRANCH (f49aa9 Fix fiscal number error messages)
diff --git a/tests/FormChooserTest.php b/tests/FormChooserTest.php
deleted file mode 100644
index b75f8d9..0000000
--- a/tests/FormChooserTest.php
+++ /dev/null
@@ -1,215 +0,0 @@
-<<<<<<< HEAD   (53f84f Merge 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.
- *
- */
-
-/**
- * @group Fundraising
- * @group DonationInterface
- * @group FormChooser
- */
-class DonationInterface_FormChooserTest extends DonationInterfaceTestCase {
-
-       /**
-        * @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
-        */
-       public function __construct( $name = null, array $data = array(), 
$dataName = '' ) {
-               $adapterclass = TESTS_ADAPTER_DEFAULT;
-               $this->testAdapterClass = $adapterclass;
-
-               parent::__construct( $name, $data, $dataName );
-       }
-
-       public function setUp() {
-               parent::setUp();
-
-               $this->setMwGlobals( array(
-                       'wgDonationInterfaceEnableFormChooser' => true,
-                       'wgGlobalCollectGatewayEnabled' => true,
-                       'wgPaypalGatewayEnabled' => true,
-                       'wgWorldpayGatewayEnabled' => true,
-               ) );
-
-               $this->setupMoreForms();
-       }
-
-       public function setupMoreForms() {
-               global $wgDonationInterfaceAllowedHtmlForms,
-                       $wgDonationInterfaceFormDirs;
-
-               $form_dirs = $wgDonationInterfaceFormDirs;
-
-               $moreForms = array ( );
-
-               $moreForms['amazon'] = array(
-                       'gateway' => 'amazon',
-                       'payment_methods' => array( 'amazon' => 'ALL' ),
-                       'redirect',
-               );
-
-               $moreForms['cc-vmad'] = array (
-                       'file' => $form_dirs['gc'] . '/cc/cc-vmad.html',
-                       'gateway' => 'globalcollect',
-                       'payment_methods' => array ( 'cc' => array ( 'visa', 
'mc', 'amex', 'discover' ) ),
-                       'countries' => array (
-                               '+' => array ( 'US', ),
-                       ),
-               );
-
-               $moreForms['cc-vmaj'] = array (
-                       'file' => $form_dirs['gc'] . '/cc/cc-vmaj.html',
-                       'gateway' => 'globalcollect',
-                       'payment_methods' => array ( 'cc' => array ( 'visa', 
'mc', 'amex', 'jcb' ) ),
-                       'countries' => array (
-                               '+' => array ( 'AD', 'AT', 'AU', 'BE', 'BH', 
'DE', 'EC', 'ES', 'FI', 'FR', 'GB',
-                                       'GF', 'GR', 'HK', 'IE', 'IT', 'JP', 
'KR', 'LU', 'MY', 'NL', 'PR',
-                                       'PT', 'SG', 'SI', 'SK', 'TH', 'TW', ),
-                       ),
-               );
-
-               $moreForms['cc-vma'] = array (
-                       'file' => $form_dirs['gc'] . '/cc/cc-vma.html',
-                       'gateway' => 'globalcollect',
-                       'payment_methods' => array ( 'cc' => array ( 'visa', 
'mc', 'amex' ) ),
-                       'countries' => array (
-                               // Array merge with cc-vmaj as fallback in case 
'j' goes down
-                               // Array merge with cc-vmad as fallback in case 
'd' goes down
-                               '+' => array_merge(
-                                       
$moreForms['cc-vmaj']['countries']['+'], 
$moreForms['cc-vmad']['countries']['+'], array ( 'AE', 'AL', 'AN', 'AR', 'BG', 
'CA', 'CH', 'CN', 'CR', 'CY', 'CZ', 'DK',
-                                       'DZ', 'EE', 'EG', 'JO', 'KE', 'HR', 
'HU', 'IL', 'KW', 'KZ', 'LB', 'LI',
-                                       'LK', 'LT', 'LV', 'MA', 'MT', 'NO', 
'NZ', 'OM', 'PK', 'PL', 'QA', 'RO',
-                                       'RU', 'SA', 'SE', 'TN', 'TR', 'UA', )
-                               )
-                       ),
-               );
-
-               $moreForms['cc'] = array (
-                       'file' => $form_dirs['gc'] . '/cc/cc.html',
-                       'gateway' => 'globalcollect',
-                       'payment_methods' => array ( 'cc' => 'ALL' ),
-                       'countries' => array ( '-' => 'VN' )
-               );
-
-               $moreForms['rtbt-ideal'] = array (
-                       'file' => $form_dirs['gc'] . '/rtbt/rtbt-ideal.html',
-                       'gateway' => 'globalcollect',
-                       'payment_methods' => array ( 'rtbt' => 'rtbt_ideal' ),
-                       'countries' => array ( '+' => 'NL' ),
-                       'currencies' => array ( '+' => 'EUR' ),
-               );
-
-               $moreForms['rtbt-sofo'] = array(
-                       'file' => $form_dirs['gc'] . '/rtbt/rtbt-sofo.html',
-                       'gateway' => 'globalcollect',
-                       'countries' => array(
-                               '+' => array( 'AT', 'BE', 'CH', 'DE' ),
-                               '-' => 'GB'
-                       ),
-                       'currencies' => array( '+' => 'EUR' ),
-                       'payment_methods' => array('rtbt' => 
'rtbt_sofortuberweisung'),
-               );
-
-               $moreForms['paypal'] = array (
-                       'file' => $form_dirs['paypal'] . '/paypal.html',
-                       'gateway' => 'paypal',
-                       'payment_methods' => array ( 'paypal' => 'ALL' ),
-               );
-
-               $moreForms['worldpay'] = array (
-                       'file' => $form_dirs['worldpay'] . '/worldpay.html',
-                       'gateway' => 'worldpay',
-                       'payment_methods' => array ( 'cc' => 'ALL' ),
-               );
-
-               $this->setMwGlobals( array(
-                       'wgDonationInterfaceAllowedHtmlForms' => array_merge(
-                               $wgDonationInterfaceAllowedHtmlForms,
-                               $moreForms
-                       ),
-               ) );
-       }
-
-       function testGetOneValidForm_CC_SpecificCountry() {
-               $tests = array (
-                       0 => array (
-                               'country' => 'US',
-                               'payment_method' => 'cc',
-                               'currency' => 'USD',
-                               'expected' => 'cc-vmad'
-                       ),
-                       1 => array (
-                               'country' => 'DK',
-                               'payment_method' => 'cc',
-                               'currency' => 'DKK',
-                               'expected' => 'cc-vma'
-                       ),
-               );
-
-               foreach ( $tests as $testno => $data ) {
-                       $form = GatewayFormChooser::getOneValidForm( 
$data['country'], $data['currency'], $data['payment_method'] );
-                       $this->assertEquals( $data['expected'], $form, "$form 
is not the preferred option for " . $data['payment_method'] . ' in ' . 
$data['country'] );
-               }
-       }
-
-       function testMaintenanceMode_Redirect() {
-
-               $this->setMwGlobals( array(
-                       'wgContributionTrackingFundraiserMaintenance' => true,
-               ) );
-
-               $expectedLocation = 
Title::newFromText('Special:FundraiserMaintenance')->getFullURL();
-               $assertNodes = array(
-                       'headers' => array(
-                               'Location' => $expectedLocation
-                       ),
-               );
-               $initial = array(
-                       'language' => 'en'
-               );
-               $this->verifyFormOutput( 'GatewayFormChooser', $initial, 
$assertNodes, false );
-       }
-
-       /**
-        * currency_code should take precedence over currency, payment_method
-        * over paymentmethod, etc.
-        */
-       function testPreferCanonicalParams() {
-               $self = $this; // someday, my upgrade will come
-               $assertNodes = array(
-                       'headers' => array(
-                               'Location' => function( $val ) use ( $self ) {
-                                       $qs = array();
-                                       parse_str( parse_url( $val, 
PHP_URL_QUERY ), $qs );
-                                       $self->assertEquals( 'paypal', 
$qs['ffname'], 'Wrong form' );
-                               }
-                       ),
-               );
-               $initial = array(
-                       'language' => 'en',
-                       'payment_method' => 'paypal',
-                       'paymentmethod' => 'amazon',
-                       'country' => 'US',
-               );
-               $this->verifyFormOutput( 'GatewayFormChooser', $initial, 
$assertNodes, false );
-       }
-}
-
-
->>>>>>> BRANCH (f49aa9 Fix fiscal number error messages)
diff --git a/tests/includes/TestingGatewayPage.php 
b/tests/includes/TestingGatewayPage.php
deleted file mode 100644
index 9bf17f5..0000000
--- a/tests/includes/TestingGatewayPage.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<<<<<<< HEAD   (53f84f Merge master into deployment)
-=======
-<?php
-
-class TestingGatewayPage extends GatewayPage {
-
-       protected $adapterClass = TESTS_ADAPTER_DEFAULT;
-
-       public function __construct() {
-               $this->logger = DonationLoggerFactory::getLoggerForType( 
'TestingGenericAdapter' );
-               //nothing!
-       }
-
-       protected function handleRequest() {
-               //also nothing!
-       }
-}
->>>>>>> BRANCH (f49aa9 Fix fiscal number error messages)
diff --git a/tests/includes/test_page/TestingAmazonGateway.php 
b/tests/includes/test_page/TestingAmazonGateway.php
deleted file mode 100644
index bec1302..0000000
--- a/tests/includes/test_page/TestingAmazonGateway.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<<<<<<< HEAD   (53f84f Merge master into deployment)
-=======
-<?php
-
-class TestingAmazonGateway extends AmazonGateway {
-
-       protected $adapterClass = 'TestingAmazonAdapter';
-
-       public function __construct() {
-               GatewayPage::__construct();
-               $this->mName = 'AmazonGateway'; // So as not to add a useless 
l10n message
-       }
-}
->>>>>>> BRANCH (f49aa9 Fix fiscal number error messages)
diff --git a/tests/includes/test_page/TestingGlobalCollectGateway.php 
b/tests/includes/test_page/TestingGlobalCollectGateway.php
deleted file mode 100644
index cb233d4..0000000
--- a/tests/includes/test_page/TestingGlobalCollectGateway.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<<<<<<< HEAD   (53f84f Merge 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.
- *
- */
-
-/**
- * TestingGlobalCollectGateway
- * ...first off, I hate the name of the form classes.
- *
- * Second: DANGER! If we ever change the class that GlobalCollectGateway 
extends
- * from, the tests will stop working correctly. But, the constructor is really
- * the only thing that we need to override.
- */
-class TestingGlobalCollectGateway extends GlobalCollectGateway {
-
-       protected $adapterClass = 'TestingGlobalCollectAdapter';
-
-       public function __construct() {
-               GatewayPage::__construct(); //DANGER: See main class comments.
-               // Don't want untranslated 'TestingGlobalCollectGateway' to 
foul our tests,
-               // don't want to waste translators' time
-               $this->mName = 'GlobalCollectGateway';
-       }
-
-}
->>>>>>> BRANCH (f49aa9 Fix fiscal number error messages)
diff --git a/tests/includes/test_page/TestingWorldpayGateway.php 
b/tests/includes/test_page/TestingWorldpayGateway.php
deleted file mode 100644
index 91d1688..0000000
--- a/tests/includes/test_page/TestingWorldpayGateway.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<<<<<<< HEAD   (53f84f Merge master into deployment)
-=======
-<?php
-
-class TestingWorldpayGateway extends WorldpayGateway {
-
-       protected $adapterClass = 'TestingWorldpayAdapter';
-
-       public function __construct() {
-               GatewayPage::__construct(); //DANGER: See main class comments.
-               // Don't want untranslated 'TestingWorldpayGateway' to foul our 
tests,
-               // don't want to waste translators' time
-               $this->mName = 'WorldpayGateway';
-       }
-
-}
->>>>>>> BRANCH (f49aa9 Fix fiscal number error messages)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4fbe83bc4ba4d7f65ae78c3102e5f1198f67bec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to