public function tearDown() { TestingGenericAdapter::$acceptedCurrencies = array(); TestingGenericAdapter::$fakeGlobals = array(); TestingGenericAdapter::$fakeIdentifier = false; parent::tearDown(); }
/** * @param $name string The name of the test case * @param $data array Any parameters read from a dataProvider * @param $dataName string|int The name or index of the data set */ public function __construct($name = null, array $data = array(), $dataName = '') { $adapterclass = TESTS_ADAPTER_DEFAULT; $this->testAdapterClass = $adapterclass; parent::__construct($name, $data, $dataName); self::setupFraudMaps($this); }
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'))))); }
/** * @param $name string The name of the test case * @param $data array Any parameters read from a dataProvider * @param $dataName string|int The name or index of the data set */ public function __construct($name = null, array $data = array(), $dataName = '') { $request = RequestContext::getMain()->getRequest(); $adapterclass = TESTS_ADAPTER_DEFAULT; $this->testAdapterClass = $adapterclass; parent::__construct($name, $data, $dataName); $this->testData = array('amount' => '128.00', 'appeal' => 'JimmyQuote', 'email' => '*****@*****.**', 'fname' => 'Testocres', 'lname' => 'McTestingyou', 'street' => '123 Fake Street', 'city' => 'Springfield', 'state' => 'US', 'zip' => '99999', 'country' => 'US', 'card_num' => '42', 'card_type' => 'visa', 'expiration' => '1138', 'cvv' => '665', 'currency_code' => 'USD', 'payment_method' => 'cc', 'payment_submethod' => 'visa', 'numAttempt' => '5', 'referrer' => 'http://www.testing.com/', 'utm_source' => '..cc', 'utm_medium' => 'large', 'utm_campaign' => 'yes', 'email-opt' => '', 'test_string' => '', 'wmf_token' => '113811', 'contribution_tracking_id' => '', 'data_hash' => '', 'action' => '', 'gateway' => 'DonationData', 'owa_session' => '', 'owa_ref' => 'http://localhost/importedTestData', 'user_ip' => $request->getIP(), 'server_ip' => $request->getIP()); }
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() { 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() { $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 testGoodSubmit() { $init = DonationInterfaceTestCase::getDonorTestData(); $init['email'] = '*****@*****.**'; $init['payment_method'] = 'cc'; $init['gateway'] = 'globalcollect'; $init['action'] = 'donate'; $apiResult = $this->doApiRequest($init); $result = $apiResult[0]['result']; $orderId = $result['orderid']; $this->assertEquals('url_placeholder', $result['formaction'], 'GC API not setting formaction'); $this->assertTrue(is_numeric($orderId), 'GC API not setting numeric order ID'); $this->assertTrue($result['status'], 'GC API result status should be true'); preg_match("/Special:GlobalCollectGatewayResult\\?order_id={$orderId}\$/", $result['returnurl'], $match); $this->assertNotEmpty($match, 'GC API not setting proper return url'); }
public function tearDown() { TestingPaypalLegacyAdapter::$fakeGlobals = array(); parent::tearDown(); }
/** * */ public function __construct() { parent::__construct(); $this->testData = array('amount' => '128', 'email' => '*****@*****.**', 'fname' => 'Testocres', 'mname' => 'S.', 'lname' => 'McTestingyou', 'street' => '123 Fake Street', 'city' => 'Springfield', 'state' => 'US', 'zip' => '99999', 'country' => 'US', 'fname2' => 'Testor', 'lname2' => 'Testeyton', 'street2' => '123 W. Grand Ave.', 'city2' => 'Oakland', 'state2' => 'CA', 'zip2' => '94607', 'country2' => 'US', 'size' => 'Big mcLargeHuge', 'premium_language' => 'fr', 'card_num' => '42', 'card_type' => 'visa', 'expiration' => '1138', 'cvv' => '665', 'currency_code' => 'USD', 'payment_method' => '', 'i_order_id' => '1234567890', 'numAttempt' => '5', 'referrer' => 'http://www.testing.com/', 'utm_source' => '..dd', 'utm_medium' => 'large', 'utm_campaign' => 'yes', 'comment-option' => '', 'comment' => 'My hovercraft is full of eels', 'email-opt' => '', 'test_string' => '', 'token' => '113811', 'contribution_tracking_id' => '', 'data_hash' => '', 'action' => '', 'gateway' => 'chainlink', 'owa_session' => '', 'owa_ref' => 'http://localhost/importedTestData'); }
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 tearDown() { // Clear static variables. TestingQueue::clearAll(); parent::tearDown(); }
public function setUp() { parent::setUp(); $this->setMwGlobals(array('wgGlobalCollectGatewayEnabled' => true)); }
/** * @param $name string The name of the test case * @param $data array Any parameters read from a dataProvider * @param $dataName string|int The name or index of the data set */ function __construct($name = null, array $data = array(), $dataName = '') { parent::__construct($name, $data, $dataName); $this->testAdapterClass = 'TestingGlobalCollectAdapter'; }
/** * @param $name string The name of the test case * @param $data array Any parameters read from a dataProvider * @param $dataName string|int The name or index of the data set */ function __construct($name = null, array $data = array(), $dataName = '') { parent::__construct($name, $data, $dataName); $this->testAdapterClass = 'TestingGlobalCollectOrphanAdapter'; $this->dummy_utm_data = array('utm_source' => 'dummy_source', 'utm_campaign' => 'dummy_campaign', 'utm_medium' => 'dummy_medium', 'date' => time()); }
public function setUp() { parent::setUp(); $this->setMwGlobals(array('wgDonationInterfaceEnableFormChooser' => true, 'wgGlobalCollectGatewayEnabled' => true, 'wgPaypalGatewayEnabled' => true)); $this->setupMoreForms(); }
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 tearDown() { TestingAmazonAdapter::$fakeGlobals = array(); parent::tearDown(); }
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'))))); }