r100945 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100944‎ | r100945 | r100946 >
Date:03:50, 27 October 2011
Author:jpostlethwaite
Status:deferred
Tags:fundraising 
Comment:
Using GlobalCollectTestAdapter for testing. Fixed typo for MerchantID.
Modified paths:
  • /trunk/extensions/DonationInterface/tests/DonationInterfaceTestCase.php (modified) (history)
  • /trunk/extensions/DonationInterface/tests/TestHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/tests/TestHelper.php
@@ -76,6 +76,11 @@
7777 require_once dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'globalcollect_gateway/globalcollect.adapter.php';
7878
7979 /**
 80+ * @see GlobalCollectTestAdapter
 81+ */
 82+require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'Adapter/GlobalCollect/GlobalCollectTestAdapter.php';
 83+
 84+/**
8085 * @see ContributionTrackingProcessor
8186 */
8287 require_once dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'ContributionTracking/ContributionTracking.processor.php';
Index: trunk/extensions/DonationInterface/tests/DonationInterfaceTestCase.php
@@ -50,7 +50,7 @@
5151 * - Do not consider this a complete test!
5252 *
5353 * @covers GatewayAdapter::__construct
54 - * @covers GatewayAdapter::currentTransaction
 54+ * @covers GatewayAdapter::setCurrentTransaction
5555 * @covers GatewayAdapter::buildRequestXML
5656 * @covers GatewayAdapter::getData
5757 */
@@ -60,11 +60,11 @@
6161
6262 $wgGlobalCollectGatewayTest = true;
6363
64 - $this->gatewayAdapter = new GlobalCollectAdapter( $options );
 64+ $this->gatewayAdapter = new GlobalCollectTestAdapter( $options );
6565
6666 $this->gatewayAdapter->setCurrentTransaction('INSERT_ORDERWITHPAYMENT');
6767
68 - $request = trim( $this->gatewayAdapter->buildRequestXML() );
 68+ $request = trim( $this->gatewayAdapter->executeBuildRequestXML() );
6969
7070 $expected = $this->getExpectedXmlRequestForGlobalCollect( $optionsForTestData, $options );
7171
@@ -281,7 +281,7 @@
282282 $expected .= '<XML>';
283283 $expected .= '<REQUEST>';
284284 $expected .= '<ACTION>INSERT_ORDERWITHPAYMENT</ACTION>';
285 - $expected .= '<META><MERCHANTID>' . $this->gatewayAdapter->getGlobal( 'MerchantId' ) . '</MERCHANTID><VERSION>1.0</VERSION></META>';
 285+ $expected .= '<META><MERCHANTID>' . $this->gatewayAdapter->getGlobal( 'MerchantID' ) . '</MERCHANTID><VERSION>1.0</VERSION></META>';
286286 $expected .= '<PARAMS>';
287287 $expected .= '<ORDER>';
288288 $expected .= '<ORDERID>' . $orderId . '</ORDERID>';

Status & tagging log