http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100731
Revision: 100731
Author: jpostlethwaite
Date: 2011-10-25 19:14:17 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
Implementing testDefineVarMap().
Modified Paths:
--------------
trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/GlobalCollectTestCase.php
Modified:
trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/GlobalCollectTestCase.php
===================================================================
---
trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/GlobalCollectTestCase.php
2011-10-25 19:12:36 UTC (rev 100730)
+++
trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/GlobalCollectTestCase.php
2011-10-25 19:14:17 UTC (rev 100731)
@@ -35,13 +35,22 @@
/**
* testDefineVarMap
+ *
+ * This is tested with a bank transfer from Spain.
+ *
* @covers GlobalCollectAdapter::__construct
* @covers GlobalCollectAdapter::defineVarMap
*/
public function testDefineVarMap() {
- $adapter = new GlobalCollectAdapter();
+ global $wgGlobalCollectGatewayTest;
+
+ $wgGlobalCollectGatewayTest = true;
+
+ $options = $this->getGatewayAdapterTestDataFromSpain();
+ $this->gatewayAdapter = new GlobalCollectAdapter( $options );
+
$var_map = array(
'ORDERID' => 'order_id',
'AMOUNT' => 'amount',
@@ -49,9 +58,10 @@
'LANGUAGECODE' => 'language',
'COUNTRYCODE' => 'country',
'MERCHANTREFERENCE' => 'order_id',
- 'RETURNURL' => 'returnto', //TODO: Fund out where the
returnto URL is supposed to be coming from.
+ 'RETURNURL' => 'returnto',
'IPADDRESS' => 'user_ip', //TODO: Not sure if this
should be OUR ip, or the user's ip. Hurm.
- 'PAYMENTPRODUCTID' => 'card_type',
+ 'ISSUERID' => 'issuer_id',
+ 'PAYMENTPRODUCTID' => 'payment_product',
'CVV' => 'cvv',
'EXPIRYDATE' => 'expiration',
'CREDITCARDNUMBER' => 'card_num',
@@ -64,7 +74,7 @@
'EMAIL' => 'email',
);
- $this->assertEquals( $var_map, $adapter->var_map );
+ $this->assertEquals( $var_map,
$this->gatewayAdapter->getVarMap() );
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs