From d9db944f0175548ba0f3927e21f3975bae099d72 Mon Sep 17 00:00:00 2001 From: Timur Karimov Date: Wed, 3 Jan 2024 16:35:01 +0100 Subject: [PATCH] remove redundant helper function --- .../test-class-wc-payment-gateway-wcpay.php | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/tests/unit/test-class-wc-payment-gateway-wcpay.php b/tests/unit/test-class-wc-payment-gateway-wcpay.php index a6e31d0bd5f..eee9b630421 100644 --- a/tests/unit/test-class-wc-payment-gateway-wcpay.php +++ b/tests/unit/test-class-wc-payment-gateway-wcpay.php @@ -2175,7 +2175,7 @@ public function test_set_mandate_data_to_payment_intent_if_not_required() { public function test_set_mandate_data_to_payment_intent_if_required() { // Mandate data is required for SEPA and Stripe Link, hence creating the gateway with a SEPA payment method should add mandate data. - $gateway = $this->create_gateway_with( new Sepa_Payment_Method( $this->mock_token_service ) ); + $gateway = $this->get_gateway( Payment_Method::SEPA ); $payment_method = 'woocommerce_payments_sepa_debit'; $order = WC_Helper_Order::create_order(); $order->set_currency( 'USD' ); @@ -3052,23 +3052,6 @@ private function create_charge_object() { return new WC_Payments_API_Charge( $this->mock_charge_id, 1500, $created ); } - private function create_gateway_with( $payment_method ) { - return new WC_Payment_Gateway_WCPay( - $this->mock_api_client, - $this->mock_wcpay_account, - $this->mock_customer_service, - $this->mock_token_service, - $this->mock_action_scheduler_service, - $payment_method, - [ $payment_method ], - $this->mock_rate_limiter, - $this->order_service, - $this->mock_dpps, - $this->mock_localization_service, - $this->mock_fraud_service - ); - } - private function init_payment_methods() { $payment_methods = [];