public function setUp()
 {
     parent::setUp();
     //make sure caf payment methods are registered
     new EE_Brewing_Regular();
     EE_Payment_Method_Manager::reset();
 }
 /**
  * setUp
  */
 public function setUp()
 {
     $return_value = parent::setUp();
     //EEG_Paypal_Pro uses $_SERVER at some point, so we need to pretend this is a regular request
     $this->go_to('http://localhost/');
     //just set a random address
     $_SERVER['REMOTE_ADDR'] = '192.0.0.1';
     add_filter('FHEE__EEG_Paypal_Pro__CurlRequest__CURLOPT_VERBOSE', '__return_false');
     //make sure caf payment methods are registered
     new EE_Brewing_Regular();
     EE_Payment_Method_Manager::reset();
     return $return_value;
 }
 public function test_register__success()
 {
     EE_Register_Payment_Method::deregister($this->_pmt_name);
     $this->_pretend_addon_hook_time();
     //double-check no one else is filtering payment method types
     remove_all_filters('FHEE__EE_Payment_Method_Manager__register_payment_methods__payment_methods_to_register');
     //first verify it doesn't already exists
     $pmt_exists = EE_Payment_Method_Manager::reset()->payment_method_type_exists($this->_pmt_name);
     $this->assertFalse($pmt_exists);
     EE_Register_Payment_Method::register($this->_pmt_name, $this->_pmt_args);
     //now check it does exist
     $pmt_exists = EE_Payment_Method_Manager::instance()->payment_method_type_exists($this->_pmt_name, TRUE);
     $this->assertTrue($pmt_exists);
 }