r102120 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102119‎ | r102120 | r102121 >
Date:21:08, 5 November 2011
Author:jpostlethwaite
Status:ok
Tags:fundraising 
Comment:
Fixed Sweden spelling mistake see r100823.
Modified paths:
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php (modified) (history)
  • /trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/AllTests.php (modified) (history)
  • /trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/RealTimeBankTransferNordeaSwedenTestCase.php (added) (history)
  • /trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/RealTimeBankTransferNordeaSweedenTestCase.php (deleted) (history)
  • /trunk/extensions/DonationInterface/tests/macros/form.twostepamount.realtimebanktransfer.nordea_sweden.htm (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php
@@ -390,7 +390,7 @@
391391 // Real Time Bank Transfers
392392 $this->payment_methods['rtbt'] = array(
393393 'label' => 'Real time bank transfer',
394 - 'types' => array( 'rtbt_ideal', 'rtbt_eps', 'rtbt_sofortuberweisung', 'rtbt_nordea_sweeden', 'rtbt_enets', ),
 394+ 'types' => array( 'rtbt_ideal', 'rtbt_eps', 'rtbt_sofortuberweisung', 'rtbt_nordea_sweden', 'rtbt_enets', ),
395395 );
396396 }
397397
@@ -598,10 +598,10 @@
599599 * Real time bank transfers
600600 */
601601
602 - // Nordea (Sweeden)
603 - $this->payment_submethods['rtbt_nordea_sweeden'] = array(
 602+ // Nordea (Sweden)
 603+ $this->payment_submethods['rtbt_nordea_sweden'] = array(
604604 'paymentproductid' => 805,
605 - 'label' => 'Nordea (Sweeden)',
 605+ 'label' => 'Nordea (Sweden)',
606606 'group' => 'rtbt',
607607 'validation' => array(),
608608 );
@@ -1209,7 +1209,7 @@
12101210 break;
12111211
12121212 /* Real time bank transfer */
1213 - case 'rtbt_nordea_sweeden':
 1213+ case 'rtbt_nordea_sweden':
12141214 case 'rtbt_enets':
12151215 case 'rtbt_sofortuberweisung':
12161216 $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid'];
Index: trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/RealTimeBankTransferNordeaSweedenTestCase.php
@@ -1,58 +0,0 @@
2 -<?php
3 -/**
4 - * Wikimedia Foundation
5 - *
6 - * LICENSE
7 - *
8 - * This program is free software; you can redistribute it and/or modify
9 - * it under the terms of the GNU General Public License as published by
10 - * the Free Software Foundation; either version 2 of the License, or
11 - * (at your option) any later version.
12 - *
13 - * This program is distributed in the hope that it will be useful,
14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 - * GNU General Public License for more details.
17 - *
18 - * @since r100823
19 - * @author Jeremy Postlethwaite <jpostlethwaite@wikimedia.org>
20 - */
21 -
22 -/**
23 - * @see DonationInterfaceTestCase
24 - */
25 -require_once dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'DonationInterfaceTestCase.php';
26 -
27 -/**
28 - *
29 - * @group Fundraising
30 - * @group Gateways
31 - * @group DonationInterface
32 - * @group GlobalCollect
33 - * @group RealTimeBankTransfer
34 - */
35 -class DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferNordeaSweedenTestCase extends DonationInterfaceTestCase {
36 -
37 - /**
38 - * testBuildRequestXml
39 - *
40 - * @covers GatewayAdapter::__construct
41 - * @covers GatewayAdapter::setCurrentTransaction
42 - * @covers GatewayAdapter::buildRequestXML
43 - * @covers GatewayAdapter::getData
44 - */
45 - public function testBuildRequestXml() {
46 -
47 - $optionsForTestData = array(
48 - 'form_name' => 'TwoStepAmount',
49 - 'payment_method' => 'rtbt',
50 - 'payment_submethod' => 'rtbt_nordea_sweeden',
51 - 'payment_product_id' => 805,
52 - );
53 -
54 - $options = $this->getGatewayAdapterTestDataFromSpain( $optionsForTestData );
55 -
56 - $this->buildRequestXmlForGlobalCollect( $optionsForTestData, $options );
57 - }
58 -}
59 -
Index: trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/AllTests.php
@@ -45,9 +45,9 @@
4646 require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'RealTimeBankTransferIdealTestCase.php';
4747
4848 /**
49 - * @see DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferNordeaSweedenTestCase
 49+ * @see DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferNordeaSwedenTestCase
5050 */
51 -require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'RealTimeBankTransferNordeaSweedenTestCase.php';
 51+require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'RealTimeBankTransferNordeaSwedenTestCase.php';
5252
5353 /**
5454 * @see DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferSofortuberweisungTestCase
@@ -99,8 +99,8 @@
100100 // Ideal
101101 $suite->addTestSuite( 'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferIdealTestCase' );
102102
103 - // Nordea (Sweeden)
104 - $suite->addTestSuite( 'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferNordeaSweedenTestCase' );
 103+ // Nordea (Sweden)
 104+ $suite->addTestSuite( 'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferNordeaSwedenTestCase' );
105105
106106 // eNETS
107107 $suite->addTestSuite( 'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferSofortuberweisungTestCase' );
Index: trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/RealTimeBankTransferNordeaSwedenTestCase.php
@@ -0,0 +1,58 @@
 2+<?php
 3+/**
 4+ * Wikimedia Foundation
 5+ *
 6+ * LICENSE
 7+ *
 8+ * This program is free software; you can redistribute it and/or modify
 9+ * it under the terms of the GNU General Public License as published by
 10+ * the Free Software Foundation; either version 2 of the License, or
 11+ * (at your option) any later version.
 12+ *
 13+ * This program is distributed in the hope that it will be useful,
 14+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 16+ * GNU General Public License for more details.
 17+ *
 18+ * @since r100823
 19+ * @author Jeremy Postlethwaite <jpostlethwaite@wikimedia.org>
 20+ */
 21+
 22+/**
 23+ * @see DonationInterfaceTestCase
 24+ */
 25+require_once dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'DonationInterfaceTestCase.php';
 26+
 27+/**
 28+ *
 29+ * @group Fundraising
 30+ * @group Gateways
 31+ * @group DonationInterface
 32+ * @group GlobalCollect
 33+ * @group RealTimeBankTransfer
 34+ */
 35+class DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferNordeaSwedenTestCase extends DonationInterfaceTestCase {
 36+
 37+ /**
 38+ * testBuildRequestXml
 39+ *
 40+ * @covers GatewayAdapter::__construct
 41+ * @covers GatewayAdapter::setCurrentTransaction
 42+ * @covers GatewayAdapter::buildRequestXML
 43+ * @covers GatewayAdapter::getData
 44+ */
 45+ public function testBuildRequestXml() {
 46+
 47+ $optionsForTestData = array(
 48+ 'form_name' => 'TwoStepAmount',
 49+ 'payment_method' => 'rtbt',
 50+ 'payment_submethod' => 'rtbt_nordea_sweden',
 51+ 'payment_product_id' => 805,
 52+ );
 53+
 54+ $options = $this->getGatewayAdapterTestDataFromSpain( $optionsForTestData );
 55+
 56+ $this->buildRequestXmlForGlobalCollect( $optionsForTestData, $options );
 57+ }
 58+}
 59+
Property changes on: trunk/extensions/DonationInterface/tests/Adapter/GlobalCollect/RealTimeBankTransferNordeaSwedenTestCase.php
___________________________________________________________________
Added: svn:eol-style
160 + native
Added: svn:mime-type
261 + text/plain
Added: svn:keywords
362 + Author Date HeadURL Header Id Revision
Index: trunk/extensions/DonationInterface/tests/macros/form.twostepamount.realtimebanktransfer.nordea_sweden.htm
@@ -13,7 +13,7 @@
1414 </thead><tbody>
1515 <tr>
1616 <td>open</td>
17 - <td>/index.php/Special:GlobalCollectGateway?form_name=TwoStepAmount&amp;payment_method=rtbt&amp;payment_submethod=rtbt_nordea_sweeden</td>
 17+ <td>/index.php/Special:GlobalCollectGateway?form_name=TwoStepAmount&amp;payment_method=rtbt&amp;payment_submethod=rtbt_nordea_sweden</td>
1818 <td></td>
1919 </tr>
2020 <tr>
@@ -29,7 +29,7 @@
3030 <tr>
3131 <td>select</td>
3232 <td>id=country</td>
33 - <td>label=Netherlands</td>
 33+ <td>label=Sweden</td>
3434 </tr>
3535 <tr>
3636 <td>type</td>
@@ -48,15 +48,20 @@
4949 </tr>
5050 <tr>
5151 <td>click</td>
52 - <td>//input[@name='amountRadio' and @value='250']</td>
 52+ <td>//input[@name='amountRadio' and @value='10']</td>
5353 <td></td>
5454 </tr>
5555 <tr>
5656 <td>click</td>
57 - <td>//table[@id='amount-radio']/tbody/tr[2]/td[3]/label</td>
 57+ <td>//table[@id='amount-radio']/tbody/tr/td[2]/label</td>
5858 <td></td>
5959 </tr>
6060 <tr>
 61+ <td>select</td>
 62+ <td>id=input_currency_code</td>
 63+ <td>label=Swedish krona</td>
 64+</tr>
 65+<tr>
6166 <td>clickAndWait</td>
6267 <td>css=input.button-plain</td>
6368 <td></td>
@@ -66,11 +71,6 @@
6772 <td>css=p.payment_error_message.payment_error_message_general</td>
6873 <td>There was an error processing your transaction. Please try again later.</td>
6974 </tr>
70 -<tr>
71 - <td>select</td>
72 - <td>id=input_currency_code</td>
73 - <td>label=EUR: Euro</td>
74 -</tr>
7575 </tbody></table>
7676 </body>
7777 </html>

Follow-up revisions

RevisionCommit summaryAuthorDate
r102236MFT r90286, r100671, r100837, r100950, r101060, r101063, r101064, r101073, r1......khorn03:06, 7 November 2011
r102237MFT r90286, r100671, r100837, r100950, r101060, r101063, r101064, r101073, r1......khorn03:07, 7 November 2011
r102732MFT r100644, r100785, r101785, r102120, r102318, r102332, r102341, r102342, r...awjrichards01:31, 11 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100823Setup unit test for Real Time Bank Transfer: NordeaSweedenjpostlethwaite16:21, 26 October 2011

Status & tagging log