Skip to content

Commit d9db944

Browse files
author
Timur Karimov
committed
remove redundant helper function
1 parent dc61bf2 commit d9db944

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

tests/unit/test-class-wc-payment-gateway-wcpay.php

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,7 +2175,7 @@ public function test_set_mandate_data_to_payment_intent_if_not_required() {
21752175

21762176
public function test_set_mandate_data_to_payment_intent_if_required() {
21772177
// 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 );
21792179
$payment_method = 'woocommerce_payments_sepa_debit';
21802180
$order = WC_Helper_Order::create_order();
21812181
$order->set_currency( 'USD' );
@@ -3052,23 +3052,6 @@ private function create_charge_object() {
30523052
return new WC_Payments_API_Charge( $this->mock_charge_id, 1500, $created );
30533053
}
30543054

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-
30723055
private function init_payment_methods() {
30733056
$payment_methods = [];
30743057

0 commit comments

Comments
 (0)