/**
  * Integration test to verify that the Donate transaction works as expected when all necessary data is present.
  */
 function testDoTransactionDonateXclick()
 {
     $init = $this->getDonorTestData();
     TestingPaypalLegacyAdapter::$fakeGlobals = array('XclickCountries' => array($init['country']));
     $gateway = $this->getFreshGatewayObject($init);
     $ret = $gateway->doPayment();
     parse_str(parse_url($ret->getRedirect(), PHP_URL_QUERY), $res);
     $expected = array('amount' => $init['amount'], 'currency_code' => $init['currency_code'], 'country' => $init['country'], 'business' => '*****@*****.**', 'cmd' => '_xclick', 'item_name' => 'Donation to the Wikimedia Foundation', 'item_number' => 'DONATE', 'no_note' => '1', 'custom' => $gateway->getData_Unstaged_Escaped('contribution_tracking_id'), 'cancel_return' => 'https://example.com/tryAgain.php/en', 'return' => 'https://example.org/wiki/Thank_You/en?country=US', 'no_shipping' => '1');
     $this->assertEquals($expected, $res, 'Paypal "DonateXclick" transaction not constructing the expected redirect URL');
 }