From 9039375ff87d3b036e0eb9a034ed71eafcb949e6 Mon Sep 17 00:00:00 2001 From: Daniel Guerra Date: Wed, 10 Jul 2024 12:34:49 -0600 Subject: [PATCH] Use the constants when able --- tests/unit/test-class-wc-payment-gateway-wcpay.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/unit/test-class-wc-payment-gateway-wcpay.php b/tests/unit/test-class-wc-payment-gateway-wcpay.php index b1fa32c24d5..a27ea5b6669 100644 --- a/tests/unit/test-class-wc-payment-gateway-wcpay.php +++ b/tests/unit/test-class-wc-payment-gateway-wcpay.php @@ -2905,7 +2905,7 @@ public function process_payment_for_order_afterpay_clearpay_provider() { ], 'locale_data' => [ // A missing `required` attribute means that the field will be required. - 'US' => [ 'state' => [ 'label' => 'State' ] ], + Country_Code::UNITED_STATES => [ 'state' => [ 'label' => 'State' ] ], ], 'expected_exception' => Invalid_Address_Exception::class, ], @@ -2917,10 +2917,9 @@ public function process_payment_for_order_afterpay_clearpay_provider() { 'country' => Country_Code::UNITED_KINGDOM, ], 'locale_data' => [ - 'GB' => [ 'state' => [ 'required' => false ] ], + Country_Code::UNITED_KINGDOM => [ 'state' => [ 'required' => false ] ], ], 'expected_exception' => null, - ], 'without city, GB' => [ 'address' => [ @@ -2930,10 +2929,9 @@ public function process_payment_for_order_afterpay_clearpay_provider() { 'country' => Country_Code::UNITED_KINGDOM, ], 'locale_data' => [ - 'GB' => [ 'state' => [ 'required' => false ] ], + Country_Code::UNITED_KINGDOM => [ 'state' => [ 'required' => false ] ], ], 'expected_exception' => Invalid_Address_Exception::class, - ], ]; }