jenkins-bot has submitted this change and it was merged. 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, 21 insertions(+), 0 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/Adapter/PayPal/PayPalTest.php b/tests/Adapter/PayPal/PayPalTest.php index f464868..ed40434 100644 --- a/tests/Adapter/PayPal/PayPalTest.php +++ b/tests/Adapter/PayPal/PayPalTest.php @@ -126,6 +126,27 @@ } /** + * Integration test to verify that the Paypal gateway redirects when validation is successful. + */ + function testRedirectFormOnValid() { + $init = $this->getDonorTestData(); + $_SESSION['Donor'] = $init; + + $that = $this; + $redirectTest = function( $location ) use ( $that, $init ) { + parse_str( parse_url( $location, PHP_URL_QUERY ), $actual ); + $that->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: merged Gerrit-Change-Id: Id9d1226d53d483f3848b3da628805825ba0697b3 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Awight <awi...@wikimedia.org> Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com> Gerrit-Reviewer: Awight <awi...@wikimedia.org> Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org> Gerrit-Reviewer: Katie Horn <kh...@wikimedia.org> Gerrit-Reviewer: Ssmith <ssm...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits