@@ -2175,7 +2175,7 @@ public function test_set_mandate_data_to_payment_intent_if_not_required() {
2175
2175
2176
2176
public function test_set_mandate_data_to_payment_intent_if_required () {
2177
2177
// Mandate data is required for SEPA and Stripe Link, hence creating the gateway with a SEPA payment method should add mandate data.
2178
- $ gateway = $ this ->create_gateway_with ( new Sepa_Payment_Method ( $ this -> mock_token_service ) );
2178
+ $ gateway = $ this ->get_gateway ( Payment_Method:: SEPA );
2179
2179
$ payment_method = 'woocommerce_payments_sepa_debit ' ;
2180
2180
$ order = WC_Helper_Order::create_order ();
2181
2181
$ order ->set_currency ( 'USD ' );
@@ -3052,23 +3052,6 @@ private function create_charge_object() {
3052
3052
return new WC_Payments_API_Charge ( $ this ->mock_charge_id , 1500 , $ created );
3053
3053
}
3054
3054
3055
- private function create_gateway_with ( $ payment_method ) {
3056
- return new WC_Payment_Gateway_WCPay (
3057
- $ this ->mock_api_client ,
3058
- $ this ->mock_wcpay_account ,
3059
- $ this ->mock_customer_service ,
3060
- $ this ->mock_token_service ,
3061
- $ this ->mock_action_scheduler_service ,
3062
- $ payment_method ,
3063
- [ $ payment_method ],
3064
- $ this ->mock_rate_limiter ,
3065
- $ this ->order_service ,
3066
- $ this ->mock_dpps ,
3067
- $ this ->mock_localization_service ,
3068
- $ this ->mock_fraud_service
3069
- );
3070
- }
3071
-
3072
3055
private function init_payment_methods () {
3073
3056
$ payment_methods = [];
3074
3057
0 commit comments