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

Change subject: Integration test that the PayPal legacy gateway shows an error 
form rather than redirect.
......................................................................


Integration test that the PayPal legacy gateway shows an error form rather than 
redirect.

Bug: T98447
Change-Id: I89dadb01d28f3590bbbc670d224600c376e98b80
---
M tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php
1 file changed, 25 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php 
b/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php
index 9f7a3c9..8bda5b1 100644
--- a/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php
+++ b/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php
@@ -199,6 +199,31 @@
        }
 
        /**
+        * Stay on the payments form if there's a currency conversion 
notification.
+        */
+       function testShowFormOnCurrencyFallback() {
+               $init = $this->getDonorTestData();
+               $init['currency'] = 'BBD';
+               $init['amount'] = 15.00;
+               $session = array( 'Donor' => $init );
+               $this->setMwGlobals( array(
+                       'wgDonationInterfaceFallbackCurrency' => 'USD',
+                       'wgDonationInterfaceNotifyOnConvert' => true,
+               ) );
+               $errorMessage = wfMessage( 
'donate_interface-fallback-currency-notice', 'USD' )->text();
+               $assertNodes = array(
+                       'headers' => array(
+                               'location' => null,
+                       ),
+                       'topError' => array(
+                               'innerhtmlmatches' => "/.*$errorMessage.*/"
+                       )
+               );
+
+               $this->verifyFormOutput( 'PaypalLegacyGateway', $init, 
$assertNodes, false, $session );
+       }
+
+       /**
         * Integration test to verify that the Donate transaction works as 
expected in Belgium for fr, de, and nl.
         *
         * @dataProvider belgiumLanguageProvider

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89dadb01d28f3590bbbc670d224600c376e98b80
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: AndyRussG <[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