Awight has uploaded a new change for review.
https://gerrit.wikimedia.org/r/197973
Change subject: Test that we are skipping the PP interstitial
......................................................................
Test that we are skipping the PP interstitial
Bug: T92705
Change-Id: Id9d1226d53d483f3848b3da628805825ba0697b3
---
M tests/Adapter/PayPal/PayPalTest.php
1 file changed, 20 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/73/197973/1
diff --git a/tests/Adapter/PayPal/PayPalTest.php
b/tests/Adapter/PayPal/PayPalTest.php
index f464868..dcc370f 100644
--- a/tests/Adapter/PayPal/PayPalTest.php
+++ b/tests/Adapter/PayPal/PayPalTest.php
@@ -126,6 +126,26 @@
}
/**
+ * Integration test to verify that the Paypal gateway redirects when
validation is successful.
+ */
+ function testRedirectFormOnValid() {
+ $init = $this->getDonorTestData();
+ $_SESSION['Donor'] = $init;
+
+ $redirectTest = function( $location ) use ( $init ) {
+ parse_str( parse_url( $location, PHP_URL_QUERY ),
$actual );
+ $this->assertEquals( $init['amount'], $actual['amount']
);
+ };
+ $assertNodes = array(
+ 'headers' => array(
+ 'Location' => $redirectTest,
+ )
+ );
+
+ $this->verifyFormOutput( 'PaypalGateway', $init, $assertNodes,
false );
+ }
+
+ /**
* Integration test to verify that the Paypal gateway shows an error
message when validation fails.
*/
function testShowFormOnError() {
--
To view, visit https://gerrit.wikimedia.org/r/197973
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9d1226d53d483f3848b3da628805825ba0697b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits