public function setUp()
 {
     parent::setUp();
     $this->queue_name = 'test-' . mt_rand();
     $this->setMwGlobals(array('wgDonationInterfaceEnableQueue' => true, 'wgDonationInterfaceDefaultQueueServer' => array('type' => 'TestingQueue'), 'wgDonationInterfaceQueues' => array($this->queue_name => array())));
     $this->transaction = array('amount' => '1.24', 'city' => 'Dunburger', 'contribution_tracking_id' => mt_rand(), 'correlation-id' => 'testgateway-' . mt_rand(), 'country' => 'US', 'currency_code' => 'USD', 'date' => time(), 'email' => '*****@*****.**', 'fname' => 'Jen', 'gateway_account' => 'default', 'gateway' => 'testgateway', 'gateway_txn_id' => mt_rand(), 'order_id' => mt_rand(), 'language' => 'en', 'lname' => 'Russ', 'payment_method' => 'cc', 'payment_submethod' => 'visa', 'php-message-class' => 'SmashPig\\CrmLink\\Messages\\DonationInterfaceMessage', 'response' => 'Gateway response something', 'state' => 'AK', 'street' => '1 Fake St.', 'user_ip' => '127.0.0.1', 'utm_source' => 'testing', 'zip' => '12345');
     $this->expected_message = array('contribution_tracking_id' => $this->transaction['contribution_tracking_id'], 'utm_source' => 'testing', 'language' => 'en', 'email' => '*****@*****.**', 'first_name' => 'Jen', 'last_name' => 'Russ', 'street_address' => '1 Fake St.', 'city' => 'Dunburger', 'state_province' => 'AK', 'country' => 'US', 'postal_code' => '12345', 'gateway' => 'testgateway', 'gateway_account' => 'default', 'gateway_txn_id' => $this->transaction['gateway_txn_id'], 'order_id' => $this->transaction['order_id'], 'payment_method' => 'cc', 'payment_submethod' => 'visa', 'response' => 'Gateway response something', 'currency' => 'USD', 'fee' => '0', 'gross' => '1.24', 'user_ip' => '127.0.0.1', 'date' => (int) $this->transaction['date'], 'source_host' => WmfFramework::getHostname(), 'source_name' => 'DonationInterface', 'source_run_id' => getmypid(), 'source_type' => 'payments', 'source_version' => DonationQueue::getVersionStamp());
 }
 public function setUp()
 {
     parent::setUp();
     $vmad_countries = array('US');
     $vmaj_countries = array('AD', 'AT', 'AU', 'BE', 'BH', 'DE', 'EC', 'ES', 'FI', 'FR', 'GB', 'GF', 'GR', 'HK', 'IE', 'IT', 'JP', 'KR', 'LU', 'MY', 'NL', 'PR', 'PT', 'SG', 'SI', 'SK', 'TH', 'TW');
     $vma_countries = array('AE', 'AL', 'AN', 'AR', 'BG', 'CA', 'CH', 'CN', 'CR', 'CY', 'CZ', 'DK', 'DZ', 'EE', 'EG', 'JO', 'KE', 'HR', 'HU', 'IL', 'KW', 'KZ', 'LB', 'LI', 'LK', 'LT', 'LV', 'MA', 'MT', 'NO', 'NZ', 'OM', 'PK', 'PL', 'QA', 'RO', 'RU', 'SA', 'SE', 'TN', 'TR', 'UA');
     $this->setMwGlobals(array('wgGlobalCollectGatewayEnabled' => true, 'wgDonationInterfaceAllowedHtmlForms' => array('cc-vmad' => array('gateway' => 'globalcollect', 'payment_methods' => array('cc' => array('visa', 'mc', 'amex', 'discover')), 'countries' => array('+' => $vmad_countries)), 'cc-vmaj' => array('gateway' => 'globalcollect', 'payment_methods' => array('cc' => array('visa', 'mc', 'amex', 'jcb')), 'countries' => array('+' => $vmaj_countries)), 'cc-vma' => array('gateway' => 'globalcollect', 'payment_methods' => array('cc' => array('visa', 'mc', 'amex')), 'countries' => array('+' => array_merge($vmaj_countries, $vmad_countries, $vma_countries))), 'rtbt-sofo' => array('gateway' => 'globalcollect', 'countries' => array('+' => array('AT', 'BE', 'CH', 'DE'), '-' => 'GB'), 'currencies' => array('+' => 'EUR'), 'payment_methods' => array('rtbt' => 'rtbt_sofortuberweisung')))));
 }
 public function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgDonationInterfaceGatewayAdapters' => array('donation' => 'TestingGatewayAdapter'), 'wgDonationInterfacePriceFloor' => 2.0, 'wgDonationInterfacePriceCeiling' => 100.0));
     TestingGenericAdapter::$acceptedCurrencies[] = 'USD';
     $this->page = new TestingGatewayPage();
     $this->adapter = new TestingGenericAdapter();
     $this->page->adapter = $this->adapter;
 }
 public function setUp()
 {
     $this->page = new TestingGatewayPage();
     // put these here so tests can override them
     TestingGenericAdapter::$fakeGlobals = array('FallbackCurrency' => 'USD');
     TestingGenericAdapter::$acceptedCurrencies[] = 'USD';
     TestingGenericAdapter::$fakeIdentifier = 'globalcollect';
     $this->setMwGlobals(array('wgPaypalGatewayEnabled' => true, 'wgDonationInterfaceAllowedHtmlForms' => array('paypal' => array('gateway' => 'paypal', 'payment_methods' => array('paypal' => 'ALL')))));
     parent::setUp();
 }
 public function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgDonationInterfacePriceFloor' => 1.5, 'wgDonationInterfacePriceCeiling' => 100, 'wgLanguageCode' => 'en'));
     $this->setUpRequest(array('country' => 'US', 'uselang' => 'en'));
     $this->normalized = array('language' => 'en', 'country' => 'US', 'currency_code' => 'USD');
     $this->errors = array();
     $this->adapter = new TestingGenericAdapter();
     $this->validator = new Amount();
 }
 public function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgDonationInterfaceOrphanCron' => array('enable' => true, 'target_execute_time' => self::TARGET_EXECUTE_TIME, 'time_buffer' => self::TIME_BUFFER), 'wgGlobalCollectGatewayEnabled' => true, 'wgDonationInterfaceGatewayAdapters' => array('globalcollect' => 'TestingGlobalCollectOrphanAdapter', 'globalcollect_orphan' => 'TestingGlobalCollectOrphanAdapter')));
     $config = SmashPigDatabaseTestConfiguration::instance();
     Context::init($config);
     $this->pendingDb = PendingDatabase::get();
     // Create the schema.
     $this->pendingDb->createTable();
 }
 public function setUp()
 {
     $this->resetAllEnv();
     $this->outputPage = $this->getMockBuilder('OutputPage')->disableOriginalConstructor()->setMethods(array('parse'))->getMock();
     $this->gatewayPage = new TestingGatewayPage();
     RequestContext::getMain()->setOutput($this->outputPage);
     $req = new TestingRequest();
     RequestContext::getMain()->setRequest($req);
     $this->adapter = new TestingGenericAdapter();
     $this->adapter->addRequestData(array('amount' => '12', 'currency_code' => 'EUR'));
     $this->setMwGlobals(array('wgTitle' => Title::newFromText('nonsense is apparently fine')));
     parent::setUp();
 }
 public function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgDonationInterfaceCancelPage' => 'https://example.com/tryAgain.php', 'wgPaypalGatewayEnabled' => true, 'wgDonationInterfaceThankYouPage' => 'https://example.org/wiki/Thank_You', 'wgDonationInterfaceAllowedHtmlForms' => array('paypal' => array('gateway' => 'paypal', 'payment_methods' => array('paypal' => 'ALL')), 'paypal-recurring' => array('gateway' => 'paypal', 'payment_methods' => array('paypal' => 'ALL'), 'recurring'))));
 }
 function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgAstroPayGatewayEnabled' => true));
 }
 public function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgGlobalCollectGatewayEnabled' => true, 'wgPaypalGatewayEnabled' => true, 'wgDonationInterfaceAllowedHtmlForms' => array('cc-vmad' => array('gateway' => 'globalcollect', 'payment_methods' => array('cc' => array('visa', 'mc', 'amex', 'discover')), 'countries' => array('+' => array('US'))), 'paypal' => array('gateway' => 'paypal', 'payment_methods' => array('paypal' => 'ALL')))));
 }
 public function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgGlobalCollectGatewayEnabled' => true));
 }
 public function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgDonationInterfaceLogCompleted' => true));
 }
 public function setUp()
 {
     parent::setUp();
     TestingAmazonAdapter::$mockClient = new MockAmazonClient();
     $this->setMwGlobals(array('wgAmazonGatewayEnabled' => true, 'wgDonationInterfaceAllowedHtmlForms' => array('amazon' => array('gateway' => 'amazon', 'payment_methods' => array('amazon' => 'ALL'), 'redirect'), 'amazon-recurring' => array('gateway' => 'amazon', 'payment_methods' => array('amazon' => 'ALL'), 'redirect', 'recurring'))));
 }
 public function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgGlobalCollectGatewayEnabled' => true, 'wgDonationInterfaceAllowedHtmlForms' => array('rtbt-ideal' => array('gateway' => 'globalcollect', 'payment_methods' => array('rtbt' => 'rtbt_ideal'), 'countries' => array('+' => 'NL'), 'currencies' => array('+' => 'EUR')))));
 }
 public function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgDonationInterfaceAllowedHtmlForms' => array('testytest' => array('gateway' => 'globalcollect'), 'rapidFailError' => array('file' => 'error-cc.html', 'gateway' => array('globalcollect', 'adyen', 'amazon', 'astropay', 'paypal'), 'special_type' => 'error'))));
 }
 public function setUp()
 {
     parent::setUp();
     $this->setMwGlobals(array('wgDonationInterfaceEnableFormChooser' => true, 'wgGlobalCollectGatewayEnabled' => true, 'wgPaypalGatewayEnabled' => true));
     $this->setupMoreForms();
 }